Add pre-commit hook for static analysis on shell scripts (shellcheck) Fixed lots of issues flagged by shellcheck.
21 lines
649 B
YAML
21 lines
649 B
YAML
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.5.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
|
|
# See https://tmt.readthedocs.io/en/latest/guide.html#checking-data-validity
|
|
- repo: https://github.com/teemtee/tmt.git
|
|
rev: 1.32.2
|
|
hooks:
|
|
- id: tmt-lint
|
|
|
|
- repo: https://github.com/koalaman/shellcheck-precommit
|
|
rev: v0.10.0
|
|
hooks:
|
|
- id: shellcheck
|
|
require_serial: true # Podman has trouble running concurrently
|
|
args: ["--exclude=SC1091"] # Ignore "Not following" sourced scripts
|