https://github.com/sky-uk/bslint
A linter for the BrightScript language.
https://github.com/sky-uk/bslint
Last synced: 5 months ago
JSON representation
A linter for the BrightScript language.
- Host: GitHub
- URL: https://github.com/sky-uk/bslint
- Owner: sky-uk
- License: bsd-3-clause
- Archived: true
- Created: 2016-08-09T09:59:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-19T16:52:34.000Z (over 7 years ago)
- Last Synced: 2026-01-04T04:54:17.504Z (5 months ago)
- Language: Python
- Homepage:
- Size: 700 KB
- Stars: 24
- Watchers: 8
- Forks: 8
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## BrightScript Linter
[](https://circleci.com/gh/sky-uk/bslint/tree/master)
*We're hiring!*
[http://developers.sky.com](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](https://sdkdocs.roku.com/display/sdkdoc/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 ` -> Executes on the specified directory (if directory is not in the ignore list)
* `bslint -p ` -> 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 -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 )**
```json
{
"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](https://sdkdocs.roku.com/display/sdkdoc/BrightScript+Language+Reference)
## Support Channel
If you have any questions try contacting us on [Gitter](https://gitter.im/bslint/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
## Team Members
Name | Github
------------ | -------------
Shane Bloomer | [@sbsky](http://github.com/sbsky)
Jack Ingleton | [@JackIngleton](http://github.com/JackIngleton)
Zac Robinson | [@zac-robinson](https://github.com/zac-robinson)
Daniele Sassoli | [@DanieleSassoli](https://github.com/DanieleSassoli)