@zuke/shellcheck

← API reference

`@zuke/shellcheck` — typed [ShellCheck](https://www.shellcheck.net/) task

Symbols

#

ShellcheckFormat

type
type ShellcheckFormat = tty | gcc | checkstyle | diff | json | json1 | quiet

An output format ShellCheck can emit (-f).

#

ShellcheckSettings

class
class ShellcheckSettings extends ToolSettings

Settings for a shellcheck run.

MemberSignatureDoc
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).
#

ShellcheckSeverity

type
type ShellcheckSeverity = error | warning | info | style

The lowest severity ShellCheck reports (-S).

#

ShellcheckShell

type
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.

#

ShellcheckTasks

const
const ShellcheckTasks: ShellcheckTasksApi

Typed task functions for the ShellCheck static analyser.

#

ShellcheckTasksApi

interface
interface ShellcheckTasksApi

The shape of ShellcheckTasks.

MemberSignatureDoc
lint lint(configure?: Configure<ShellcheckSettings>): Promise<CommandOutput> Analyse shell scripts with shellcheck.