Skip to content

jazzatar/vscode-shellcheck

 
 

Repository files navigation

vscode-shellcheck

https://travis-ci.com/timonwong/vscode-shellcheck Current Version Install Count Greenkeeper badge

Requirements

  1. Ensure shellcheck is installed (v0.4.7 or better is recommended to use).
  2. Run Install Extension command from Command Palette.
  3. Search and choose shellcheck.

Options

There are various options that can be configured by making changes to your user or workspace preferences.

Default options are:

{
    "shellcheck.enable": true,
    "shellcheck.run": "onType",
    "shellcheck.executablePath": "shellcheck",
    "shellcheck.exclude": [],
    "shellcheck.customArgs": [],
    "shellcheck.ignorePatterns": {},
    "shellcheck.useWSL": false
}

Lint onType or onSave

By default the linter will lint as you type. Alternatively, set shellcheck.run to onSave if you want to lint only when the file is saved (works best if auto-save is on).

{
    "shellcheck.run": "onType" // also: "onSave"
}

Excluding Checks

By default all shellcheck checks are performed and reported on as necessary. To globally ignore certain checks in all files, add the "SC identifiers" to shellcheck.exclude. For example, to exclude SC1017:

{
    "shellcheck.exclude": [1017],
}

Using Docker version of shellcheck

In order to get it work, you need a "shim" script, and then, just remember, do not try to construct command line arguments for shellcheck yourself.

Here is a simple "shim" script to get start with (See discussion: #24):

#!/bin/bash

exec docker run --rm -i -v "$PWD:/mnt:ro" koalaman/shellcheck:v0.5.0 "$@"

Acknowledgements

This extension is based on hoovercj's Haskell Linter.

About

shellcheck linter for vscode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%