An open API service indexing awesome lists of open source software.

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

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