zuke.tools.shellcheck

← Python API reference

@zuke/shellcheck 1.1.0: @zuke/shellcheck — typed [ShellCheck](https://www.shellcheck.net/) task wrappers for Zuke builds.

Symbols

#

ShellcheckSettings

class
class ShellcheckSettings(ToolSettings)

Settings for a shellcheck run.

  • paths(*values: str) -> Self

    Scripts to check (positional); repeatable.

  • shell(dialect: Literal['sh', 'bash', 'dash', 'ksh', 'busybox']) -> Self

    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(level: Literal['error', 'warning', 'info', 'style']) -> Self

    The lowest severity to report (-S/--severity).

  • format(value: Literal['tty', 'gcc', 'checkstyle', 'diff', 'json', 'json1', 'quiet']) -> Self

    The output format (-f/--format).

  • exclude(*codes: str) -> Self

    Suppress specific checks by code (-e/--exclude); repeatable. Codes may be given with or without the SC prefix, as ShellCheck accepts both.

  • external_sources() -> Self

    Follow sourced files outside the checked set (-x/--external-sources).

#

ShellcheckTasks

class
class ShellcheckTasks

Typed task functions for the ShellCheck static analyser.

  • static async lint(ctx: ServiceContext, configure: Callable[[ShellcheckSettings], ShellcheckSettings] | None=None) -> ExecResult

    Analyse shell scripts with shellcheck.