@zuke/shellcheck
`@zuke/shellcheck` — typed [ShellCheck](https://www.shellcheck.net/) task
@zuke/shellcheck on JSR ↗ 6 symbols
Symbols
type ShellcheckFormat = tty | gcc | checkstyle | diff | json | json1 | quiet An output format ShellCheck can emit (-f).
class ShellcheckSettings extends ToolSettings Settings for a shellcheck run.
| Member | Signature | Doc |
|---|---|---|
paths | paths(...values: PathLike[]): this | Scripts to check (positional); repeatable. |
shell | shell(dialect: ShellcheckShell): this | The dialect to analyse as (-s/--shell), overriding the shebang. This is the flag that makes a portability gate mean something: a script with a #!/bin/bash shebang, or none at all, is otherwise checked as bash, so the POSIX violations the gate exists to catch go unreported. |
severity | severity(level: ShellcheckSeverity): this | The lowest severity to report (-S/--severity). |
format | format(value: ShellcheckFormat): this | The output format (-f/--format). |
exclude | exclude(...codes: string[]): this | Suppress specific checks by code (-e/--exclude); repeatable. Codes may be given with or without the SC prefix, as ShellCheck accepts both. |
externalSources | externalSources(): this | Follow sourced files outside the checked set (-x/--external-sources). |
type ShellcheckSeverity = error | warning | info | style The lowest severity ShellCheck reports (-S).
type ShellcheckShell = sh | bash | dash | ksh | busybox A shell dialect ShellCheck can analyse (-s), overriding the shebang.
A closed set: ShellCheck rejects anything else outright, so the type does the same job the settings class does — the mistake is a compile error rather than a failed run.
const ShellcheckTasks: ShellcheckTasksApi Typed task functions for the ShellCheck static analyser.
interface ShellcheckTasksApi The shape of ShellcheckTasks.
| Member | Signature | Doc |
|---|---|---|
lint | lint(configure?: Configure<ShellcheckSettings>): Promise<CommandOutput> | Analyse shell scripts with shellcheck. |