ShellCheck

A shell script static analysis tool.

Version

0.6.0

Runtime

Debian Stretch

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)
    -S SEVERITY       --severity=SEVERITY      Minimum severity of errors to consider (error, warning, info, style)
    -x                --external-sources       Allow 'source' outside of FILES.
    

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 ""