docs/versioned_docs/version-1.0-beta/modules/shellcheck.mdx
Official module: dagger/shellcheck
Install with dagger mod install github.com/dagger/shellcheck.
The ShellCheck module finds shell scripts and checks them with ShellCheck.
Use it when scripts are part of the project and should be treated like code, not as untested glue.
check: run ShellCheck on discovered shell scripts.scripts: see which .sh files the module finds.Install the module, then run its check:
dagger mod install github.com/dagger/shellcheck
dagger check # run every check in the workspace
dagger check shellcheck:check # run ShellCheck on discovered shell scripts
check finds every .sh file in the workspace and runs ShellCheck on each one, so a script must use the .sh extension to be discovered. Use scripts to see exactly which files the module found.
List the current settings and their values with dagger settings shellcheck. The exclude setting is list-valued, so set it in .dagger/config.toml under [modules.shellcheck.settings].
exclude (default: none): a list of script paths to skip. Use it for vendored or generated scripts the repo does not own.[modules.shellcheck.settings]
exclude = ["vendor/", "third_party/"]
Keep the exclude list narrow so new scripts are checked automatically.
This module is small and high value. It is a good default check for repos that contain deployment scripts, local dev scripts, or CI helper scripts.
Source repo: github.com/dagger/shellcheck