github.com/go-graphite/carbonapi@v0.17.0/scripts/generate-lint-report.sh (about) 1 #!/bin/sh 2 3 # This script will result in 1 file being generated: 4 # - lint.out 5 6 command -v golangci-lint >/dev/null 2>&1 || { echo "golangci-lint is not installed"; exit 1; } 7 8 golangci-lint run --issues-exit-code 0 > lint.raw 9 10 if [ -s lint.raw ]; then 11 echo 'Go lint report:' > lint.out 12 { 13 echo '<details>' 14 echo '<summary>Click to expand.</summary>' 15 echo '' 16 echo '```' 17 cat lint.raw 18 echo '```' 19 echo '' 20 echo '</details>' 21 } >> lint.out 22 else 23 echo 'Go lint report:' > lint.out 24 { 25 echo '' 26 echo 'No issues found. :sunglasses:' 27 } >> lint.out 28 fi