Giter Club home page Giter Club logo

bslint's Introduction

BrightScript Linter

CircleCI

We're hiring! http://developers.sky.com

#Description

This is a tool for linting BrightScript.

This tool has been made because there aren't any tools currently available to help developers keep their coding standards consistent. The linter validates against the official BrightScript Language Reference. Currently the linter only lexes the file and validates styling. We are actively developing a parser which will be integrated into this project.

#Installing bslint via pip3

The package is published on pip3, to install follow the steps below:

  1. Ensure that you've got Python3 installed on your machine (https://www.python.org/downloads/). To check if python3 is already installed, run python3 -V in your terminal.

  2. Install bslint by running the following command in terminal pip3 install bslint.

#Upgrading bslint via pip3

To upgrade bslint run the following command in terminal pip3 install bslint --upgrade.

#Running bslint from terminal

To run bslint from the terminal, cd to the directory that you wish to lint and run the command bslint.

##Basic Options

You can run bslint in multiple ways:

  • bslint -> Executes on the current directory and all subdirectories
  • bslint -p <directory_path> -> Executes on the specified directory (if directory is not in the ignore list)
  • bslint -p <file_path> -> Executes only on the specified file (even if the parent directory is in the ignore list)
  • bslint -l -> will only check the code for styling warnings, therefore not giving any errors.
    You can combine the -p flag with the -l if you want to only lex a specific folder or directory.(e.g. bslint -p <file_path> -l
  • bslint -v -> will give you the current version. For a general overview of all the possible commands you can always type bslint -h or bslint --help

##Advanced Options

You can create a .bslintrc file, this MUST be in the same directory as your manifest file. The .bslintrc file must be valid JSON. In this file you can specify specific directories you want to ignore each time and override the default styling rules checks.

Every key in the .bslintrc file is optional (except for ignore, which can be left as an empty array )

{
    "ignore": ["components", "src/subdirectory_name"],
    "spell_check": {
        "active": true,
        "params": {
            "dictionary": "en_GB"
        }
    }
}

For a full list of styling rules, view the default config file in bslint/config in the Github source code

Watching for Changes

If you want to run the linter each time a file changes then refer to this page in the wiki: https://github.com/sky-uk/bslint/wiki/Watching-For-Changes

Roku SDK Documentation

BrightScript Language Reference

Support Channel

If you have any questions try contacting us on Gitter

Team Members

Name Github
Shane Bloomer @sbsky
Jack Ingleton @JackIngleton
Zac Robinson @zac-robinson
Daniele Sassoli @DanieleSassoli

bslint's People

Contributors

danielesassoli avatar zac-robinson avatar vasiuadriana avatar

Watchers

James Cloos avatar Alexandru Dorash avatar

Forkers

waaadim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.