···116117: The `lychee` package to use.
1180000000000000000000000000000000000000000000000000119## `testVersion` {#tester-testVersion}
120121Checks that the output from running a command contains the specified version string in it as a whole word.
···116117: The `lychee` package to use.
118119+## `shellcheck` {#tester-shellcheck}
120+121+Runs files through `shellcheck`, a static analysis tool for shell scripts.
122+123+:::{.example #ex-shellcheck}
124+# Run `testers.shellcheck`
125+126+A single script
127+128+```nix
129+testers.shellcheck {
130+ name = "shellcheck";
131+ src = ./script.sh;
132+}
133+```
134+135+Multiple files
136+137+```nix
138+let
139+ inherit (lib) fileset;
140+in
141+testers.shellcheck {
142+ name = "shellcheck";
143+ src = fileset.toSource {
144+ root = ./.;
145+ fileset = fileset.unions [
146+ ./lib.sh
147+ ./nixbsd-activate
148+ ];
149+ };
150+}
151+```
152+153+:::
154+155+### Inputs {#tester-shellcheck-inputs}
156+157+[`src` (path or string)]{#tester-shellcheck-param-src}
158+159+: The path to the shell script(s) to check.
160+ This can be a single file or a directory containing shell files.
161+ All files in `src` will be checked, so you may want to provide `fileset`-based source instead of a whole directory.
162+163+### Return value {#tester-shellcheck-return}
164+165+A derivation that runs `shellcheck` on the given script(s).
166+The build will fail if `shellcheck` finds any issues.
167+168## `testVersion` {#tester-testVersion}
169170Checks that the output from running a command contains the specified version string in it as a whole word.