"Fossies" - the Fresh Open Source Software Archive

Member "cli-1.1280.1/cliv2/scripts/lint.sh" (20 Feb 2024, 350 Bytes) of package /linux/misc/snyk-cli-1.1280.1.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env bash
    2 set -euo pipefail
    4 echo "Running gofmt"
    6 # gofmt does not fail if issues are found so check if unformatted files are listed
    7 GOFMT_RESULT="$(gofmt -l -e .)"
    8 if test -n "${GOFMT_RESULT}"; then
    9   echo "${GOFMT_RESULT}"
   10   echo "Formatting issues found. Run 'make format' to fix them.";
   11   exit 1;
   12 fi
   13 echo "No formatting issues found."