> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ShellCheck

> ShellCheck is a static analysis tool designed to identify and report syntax errors and potential issues in shell scripts

[**ShellCheck**](https://www.shellcheck.net/) is a linter for Bash.

You can enable the ShellCheck linter with:

```shell theme={null}
trunk check enable shellcheck
```

<Frame caption="ShellCheck example output">
  <img src="https://mintcdn.com/trunk-4cab4936/WAR0qJ1WO0rtUlqz/assets/code-quality/overview/linters/supported/shellcheck.gif?s=f265a94d482ccd48c0ae1e3acf4ad57b" alt="shellcheck example output" width="1000" height="600" data-path="assets/code-quality/overview/linters/supported/shellcheck.gif" />
</Frame>

## Auto Enabling

ShellCheck will be auto-enabled if any *Shell* files are present.

## Settings

ShellCheck supports the following config files:

* `.shellcheckrc`
* `shellcheckrc`

You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linters](../configure-linters#moving-linters) for more info. Trunk Code Quality provides a default `.shellcheckrc` if your project does not already have one.

## Links

* [ShellCheck site](https://www.shellcheck.net/)
* ShellCheck Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/shellcheck)
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
