github.com/weaveworks/common@v0.0.0-20230728070032-dd9e68f319d5/tools/shell-lint (about)

     1  #!/usr/bin/env bash
     2  #
     3  # Lint all shell files in given directories with `shellcheck`.
     4  #
     5  # e.g.
     6  #     $ shell-lint infra k8s
     7  #
     8  # Depends on:
     9  # - shellcheck
    10  # - files-with-type
    11  # - file >= 5.22
    12  
    13  "$(dirname "${BASH_SOURCE[0]}")/files-with-type" text/x-shellscript "$@" | xargs --no-run-if-empty shellcheck