Merge pull request #1571 from virgilwashere/master
docs: add Chocolatey installation method
This commit is contained in:
commit
65e7f2059d
48
README.md
48
README.md
|
@ -21,12 +21,15 @@ See [the gallery of bad code](README.md#user-content-gallery-of-bad-code) for ex
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Table of Contents](#table-of-contents)
|
||||||
- [How to use](#how-to-use)
|
- [How to use](#how-to-use)
|
||||||
- [On the web](#on-the-web)
|
- [On the web](#on-the-web)
|
||||||
- [From your terminal](#from-your-terminal)
|
- [From your terminal](#from-your-terminal)
|
||||||
- [In your editor](#in-your-editor)
|
- [In your editor](#in-your-editor)
|
||||||
- [In your build or test suites](#in-your-build-or-test-suites)
|
- [In your build or test suites](#in-your-build-or-test-suites)
|
||||||
- [Installing](#installing)
|
- [Installing](#installing)
|
||||||
|
- [Travis CI](#travis-ci)
|
||||||
|
- [Installing the shellcheck binary](#installing-the-shellcheck-binary)
|
||||||
- [Compiling from source](#compiling-from-source)
|
- [Compiling from source](#compiling-from-source)
|
||||||
- [Installing Cabal](#installing-cabal)
|
- [Installing Cabal](#installing-cabal)
|
||||||
- [Compiling ShellCheck](#compiling-shellcheck)
|
- [Compiling ShellCheck](#compiling-shellcheck)
|
||||||
|
@ -46,6 +49,7 @@ See [the gallery of bad code](README.md#user-content-gallery-of-bad-code) for ex
|
||||||
- [Reporting bugs](#reporting-bugs)
|
- [Reporting bugs](#reporting-bugs)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
- [Copyright](#copyright)
|
- [Copyright](#copyright)
|
||||||
|
- [Other Resources](#other-resources)
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
|
@ -53,7 +57,7 @@ There are a number of ways to use ShellCheck!
|
||||||
|
|
||||||
### On the web
|
### On the web
|
||||||
|
|
||||||
Paste a shell script on https://www.shellcheck.net for instant feedback.
|
Paste a shell script on <https://www.shellcheck.net> for instant feedback.
|
||||||
|
|
||||||
[ShellCheck.net](https://www.shellcheck.net) is always synchronized to the latest git commit, and is the easiest way to give ShellCheck a go. Tell your friends!
|
[ShellCheck.net](https://www.shellcheck.net) is always synchronized to the latest git commit, and is the easiest way to give ShellCheck a go. Tell your friends!
|
||||||
|
|
||||||
|
@ -88,7 +92,7 @@ It makes canonical use of exit codes, so you can just add a `shellcheck` command
|
||||||
|
|
||||||
For example, in a Makefile:
|
For example, in a Makefile:
|
||||||
|
|
||||||
```
|
```Makefile
|
||||||
check-scripts:
|
check-scripts:
|
||||||
# Fail if any of these files have warnings
|
# Fail if any of these files have warnings
|
||||||
shellcheck myscripts/*.sh
|
shellcheck myscripts/*.sh
|
||||||
|
@ -96,7 +100,7 @@ check-scripts:
|
||||||
|
|
||||||
or in a Travis CI `.travis.yml` file:
|
or in a Travis CI `.travis.yml` file:
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
script:
|
script:
|
||||||
# Fail if any of these files have warnings
|
# Fail if any of these files have warnings
|
||||||
- shellcheck myscripts/*.sh
|
- shellcheck myscripts/*.sh
|
||||||
|
@ -182,10 +186,18 @@ Or use OneClickInstall - https://software.opensuse.org/package/ShellCheck
|
||||||
On Solus:
|
On Solus:
|
||||||
|
|
||||||
eopkg install shellcheck
|
eopkg install shellcheck
|
||||||
|
|
||||||
On Windows (via [scoop](http://scoop.sh)):
|
|
||||||
|
|
||||||
scoop install shellcheck
|
On Windows (via [chocolatey](https://chocolatey.org/packages/shellcheck)):
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
C:\> choco install shellcheck
|
||||||
|
```
|
||||||
|
|
||||||
|
Or Windows (via [scoop](http://scoop.sh)):
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
C:\> scoop install shellcheck
|
||||||
|
```
|
||||||
|
|
||||||
From Snap Store:
|
From Snap Store:
|
||||||
|
|
||||||
|
@ -210,8 +222,10 @@ or see the [storage bucket listing](https://shellcheck.storage.googleapis.com/in
|
||||||
|
|
||||||
Distro packages already come with a `man` page. If you are building from source, it can be installed with:
|
Distro packages already come with a `man` page. If you are building from source, it can be installed with:
|
||||||
|
|
||||||
pandoc -s -t man shellcheck.1.md -o shellcheck.1
|
```console
|
||||||
sudo mv shellcheck.1 /usr/share/man/man1
|
pandoc -s -t man shellcheck.1.md -o shellcheck.1
|
||||||
|
sudo mv shellcheck.1 /usr/share/man/man1
|
||||||
|
```
|
||||||
|
|
||||||
## Travis CI
|
## Travis CI
|
||||||
|
|
||||||
|
@ -282,12 +296,16 @@ may use a legacy codepage. In `cmd.exe`, `powershell.exe` and Powershell ISE,
|
||||||
make sure to use a TrueType font, not a Raster font, and set the active
|
make sure to use a TrueType font, not a Raster font, and set the active
|
||||||
codepage to UTF-8 (65001) with `chcp`:
|
codepage to UTF-8 (65001) with `chcp`:
|
||||||
|
|
||||||
> chcp 65001
|
```cmd
|
||||||
Active code page: 65001
|
chcp 65001
|
||||||
|
Active code page: 65001
|
||||||
|
```
|
||||||
|
|
||||||
In Powershell ISE, you may need to additionally update the output encoding:
|
In Powershell ISE, you may need to additionally update the output encoding:
|
||||||
|
|
||||||
> [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
```powershell
|
||||||
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||||
|
```
|
||||||
|
|
||||||
### Running tests
|
### Running tests
|
||||||
|
|
||||||
|
@ -456,7 +474,7 @@ while getopts "a" f; do case $f in "b") # Unhandled getopts flags
|
||||||
|
|
||||||
## Testimonials
|
## Testimonials
|
||||||
|
|
||||||
> At first you're like "shellcheck is awesome" but then you're like "wtf are we still using bash"
|
> 🔉 At first you're like "shellcheck is awesome" but then you're like "wtf are we still using bash"
|
||||||
|
|
||||||
Alexander Tarasikov,
|
Alexander Tarasikov,
|
||||||
[via Twitter](https://twitter.com/astarasikov/status/568825996532707330)
|
[via Twitter](https://twitter.com/astarasikov/status/568825996532707330)
|
||||||
|
@ -465,13 +483,13 @@ Alexander Tarasikov,
|
||||||
|
|
||||||
Issues can be ignored via environmental variable, command line, individually or globally within a file:
|
Issues can be ignored via environmental variable, command line, individually or globally within a file:
|
||||||
|
|
||||||
https://github.com/koalaman/shellcheck/wiki/Ignore
|
<https://github.com/koalaman/shellcheck/wiki/Ignore>
|
||||||
|
|
||||||
## Reporting bugs
|
## Reporting bugs
|
||||||
|
|
||||||
Please use the GitHub issue tracker for any bugs or feature suggestions:
|
Please use the GitHub issue tracker for any bugs or feature suggestions:
|
||||||
|
|
||||||
https://github.com/koalaman/shellcheck/issues
|
<https://github.com/koalaman/shellcheck/issues>
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
@ -490,7 +508,7 @@ Copyright 2012-2018, Vidar 'koala_man' Holen and contributors.
|
||||||
|
|
||||||
Happy ShellChecking!
|
Happy ShellChecking!
|
||||||
|
|
||||||
|
|
||||||
## Other Resources
|
## Other Resources
|
||||||
|
|
||||||
* The wiki has [long form descriptions](https://github.com/koalaman/shellcheck/wiki/Checks) for each warning, e.g. [SC2221](https://github.com/koalaman/shellcheck/wiki/SC2221).
|
* The wiki has [long form descriptions](https://github.com/koalaman/shellcheck/wiki/Checks) for each warning, e.g. [SC2221](https://github.com/koalaman/shellcheck/wiki/SC2221).
|
||||||
* ShellCheck does not attempt to enforce any kind of formatting or indenting style, so also check out [shfmt](https://github.com/mvdan/sh)!
|
* ShellCheck does not attempt to enforce any kind of formatting or indenting style, so also check out [shfmt](https://github.com/mvdan/sh)!
|
||||||
|
|
Loading…
Reference in New Issue