File: golint.sh

package info (click to toggle)
golang-github-spf13-pflag 1.0.6~git20210604-d5e0c0615ace-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports, bookworm-proposed-updates, experimental, forky, sid, trixie
  • size: 532 kB
  • sloc: sh: 80; makefile: 2
file content (15 lines) | stat: -rwxr-xr-x 314 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

ROOT=$(dirname "${BASH_SOURCE}")/..
GOLINT=${GOLINT:-"golint"}

pushd "${ROOT}" > /dev/null
  bad_files=$($GOLINT -min_confidence=0.9 ./...)
  if [[ -n "${bad_files}" ]]; then
    echo "!!! '$GOLINT' problems: "
    echo "${bad_files}"
    exit 1
  fi
popd > /dev/null

# ex: ts=2 sw=2 et filetype=sh