https://github.com/bewuethr/shellcheck-action
A GitHub Action to run the shell linter ShellCheck
https://github.com/bewuethr/shellcheck-action
github-actions shell shellcheck shellcheck-action
Last synced: 2 months ago
JSON representation
A GitHub Action to run the shell linter ShellCheck
- Host: GitHub
- URL: https://github.com/bewuethr/shellcheck-action
- Owner: bewuethr
- License: mit
- Created: 2020-03-02T00:23:35.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-12-03T15:47:40.000Z (4 months ago)
- Last Synced: 2025-12-22T21:50:10.702Z (3 months ago)
- Topics: github-actions, shell, shellcheck, shellcheck-action
- Language: Shell
- Homepage:
- Size: 71.3 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shellcheck-action
[![Lint code base][lintbadge]][lintworkflow]
[![Update release tags][tagbadge]][tagworkflow]
[![Add issues to project][addbadge]][addworkflow]
[lintbadge]:
[lintworkflow]:
[tagbadge]:
[tagworkflow]:
[addbadge]:
[addworkflow]:
This action runs [ShellCheck] on every file containing shell code in the
repository.
To determine if a file is a shell script, the output of `file` is matched
against the extended regular expression
```txt
((POSIX|Korn|Bourne-Again) shell|/usr/bin/env k?sh) script
```
Additionally, files with the extensions `.sh`, `.bash` and `.ksh` are checked.
[ShellCheck]: https://github.com/koalaman/shellcheck
## Example usage
```yml
uses: bewuethr/shellcheck-action@v2
```
## Versions
To get the latest version of a major release, the major release without minor
and patch release can be used.
For example: if the latest release is `v2.1.2`,
```yml
uses: bewuethr/shellcheck-action@v2
```
and
```yml
uses: bewuethr/shellcheck-action@v2.1.2
```
will fetch `v2.1.2`. The advantage of using just `@v2` is that minor releases
and patches are included without requiring a change; the advantage of using
`@v2.1.2` is knowing that the action does 100% the same thing every time.
This is done via the [release-tag-tracker] action.
[release-tag-tracker]: https://github.com/marketplace/actions/release-tag-tracker