mirror of
https://github.com/ludeeus/action-shellcheck.git
synced 2025-01-18 17:41:58 +01:00
60 lines
1013 B
Markdown
60 lines
1013 B
Markdown
# ShellCheck
|
|
|
|
_GitHub action for ShellCheck._
|
|
|
|
## Example
|
|
|
|
```yaml
|
|
on:
|
|
push:
|
|
branch:
|
|
- master
|
|
|
|
name: 'Trigger: Push action'
|
|
|
|
jobs:
|
|
shellcheck:
|
|
name: Shellcheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: Run ShellCheck
|
|
uses: ludeeus/action-shellcheck@master
|
|
```
|
|
|
|
## Globally disable checks
|
|
|
|
To disable specific checks add it to a `SHELLCHECK_OPTS` env key in the job definition.
|
|
|
|
example:
|
|
|
|
```yaml
|
|
...
|
|
- name: Run ShellCheck
|
|
uses: ludeeus/action-shellcheck@master
|
|
env:
|
|
SHELLCHECK_OPTS: -e SC2059 -e SC2034 -e SC1090
|
|
```
|
|
|
|
## Disable paths
|
|
|
|
You can use the `ignore` input to disable specific directories.
|
|
|
|
```text
|
|
sample structure:
|
|
sample/directory/with/files/toignore/test.sh
|
|
sample/directory/with/files/test.sh
|
|
```
|
|
|
|
example:
|
|
|
|
```yaml
|
|
...
|
|
- name: Run ShellCheck
|
|
uses: ludeeus/action-shellcheck@master
|
|
with:
|
|
ignore: toignore
|
|
```
|
|
|
|
This will skip `sample/directory/with/files/toignore/test.sh`
|