Repository: SublimeLinter/SublimeLinter-shellcheck Branch: master Commit: 0fc856cc762c Files: 8 Total size: 3.9 KB Directory structure: gitextract_4bq8o6xz/ ├── .gitignore ├── .python-version ├── .travis.yml ├── LICENSE ├── README.md ├── linter.py ├── messages/ │ └── install.txt └── messages.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store ================================================ FILE: .python-version ================================================ 3.8 ================================================ FILE: .travis.yml ================================================ language: python python: - "3.6" install: - pip install flake8 script: - flake8 . --max-line-length=120 ================================================ FILE: LICENSE ================================================ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ SublimeLinter-shellcheck ========================= [![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-shellcheck.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-shellcheck) This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to [shellcheck](http://www.shellcheck.net/about.html). It will be used with files that have the "Shell-Unix-Generic" syntax (aka Shell Script (Bash)). ## Installation SublimeLinter must be installed in order to use this plugin. Please use [Package Control](https://packagecontrol.io) to install the linter plugin. Before using this plugin, ensure that `shellcheck` is installed on your system. To install `shellcheck`, follow the instructions on [the shellcheck GitHub repository](https://github.com/koalaman/shellcheck). `shellcheck` can be installed with ``apt-get`` on Debian sid, ``brew`` on Mac OS X, or compiled from its Haskell sources (manually, or through `cabal`). On Windows either install natively or use the Linux Subsystem. See [Microsoft's guide](https://docs.microsoft.com/en-us/windows/wsl/install-win10), then run `wsl sudo apt update` and `wsl sudo apt install shellcheck` to install Shellcheck (if you installed Ubuntu). On native Linux systems, Please make sure that the path to `shellcheck` is available to SublimeLinter. The docs cover [troubleshooting PATH configuration](http://sublimelinter.com/en/latest/troubleshooting.html#finding-a-linter-executable). ## Settings - SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html - Linter settings: http://sublimelinter.com/en/latest/linter_settings.html Additional SublimeLinter-shellcheck settings: |Setting|Description| |:------|:----------| |exclude|A comma-delimited list of codes to exclude.| E.g. you can use a single string (eg: ``"SC2034,SC2086"``), or an array of strings (eg: ``["SC2034", "SC2086"]``). ================================================ FILE: linter.py ================================================ from SublimeLinter.lint import Linter from shutil import which import sublime class Shellcheck(Linter): cmd = 'shellcheck --format=gcc ${args} -' if sublime.platform() == 'windows' and not which('shellcheck') and which('wsl'): cmd = 'wsl ' + cmd regex = ( r'^.+?:(?P\d+):(?P\d+): ' r'(?:(?Perror)|(?P(warning|note))): ' r'(?P.+)$' ) defaults = { 'selector': 'source.shell.bash - source.makefile - source.shell.fish - text.html', '--exclude=,': '' } ================================================ FILE: messages/install.txt ================================================ SublimeLinter-shellcheck ------------------------------- This linter plugin for SublimeLinter provides an interface to shellcheck. Please read the installation instructions at: https://github.com/SublimeLinter/SublimeLinter-shellcheck Follow install instructions of shellcheck at https://github.com/koalaman/shellcheck ================================================ FILE: messages.json ================================================ { "install": "messages/install.txt" }