ShellCheck

A shell script static analysis tool.

Version

0.5.0

Runtime

Alpine Linux 3.7

Supported Languages

Shell

Official Documentation

https://github.com/koalaman/shellcheck

YAML Configuration

shellcheck:

  • input:

    Patterns to include in execution and reports.

  • ignore:

    Patterns to exclude from execution and reports.

  • auto-fix:

    N/A

  • config-file:

    N/A

  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.25 CPU with 960 MiB RAM.

  • options:

    Below is the list of options that are supported:

    -e CODE1,CODE2..  --exclude=CODE1,CODE2..  exclude types of warnings
    -s SHELLNAME      --shell=SHELLNAME        Specify dialect (sh,bash,dash,ksh)
    -x                --external-sources       Allow 'source' outside of FILES.
  • thresholds:

    • num-issues:

      In addition to general severity levels, the following tool specific severity levels can be specified:

      • note (equivalent to general severity level info)

YAML Examples

  • With default options:

    inspecode:
      shellcheck: default
  • With custom machine:

    inspecode:
      shellcheck:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
  • With custom options:

    inspecode:
      shellcheck:
        options:
          --exclude: SC2030,SC2031,SC2064
          --shell: bash

results matching ""

    No results matching ""