...

Text file src/github.com/chrismellard/docker-credential-acr-env/hack/linter.sh

Documentation: github.com/chrismellard/docker-credential-acr-env/hack

     1#!/bin/bash
     2
     3set -e -o pipefail
     4
     5if [ "$DISABLE_LINTER" == "true" ]
     6then
     7  exit 0
     8fi
     9
    10DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    11
    12if ! [ -x "$(command -v golangci-lint)" ]; then
    13	echo "Installing GolangCI-Lint"
    14	${DIR}/install_golint.sh -b $GOPATH/bin v1.20.0
    15fi
    16
    17export GO111MODULE=on
    18golangci-lint run \
    19	--no-config \
    20  --disable-all \
    21  -E golint \
    22  -E varcheck \
    23  -E errcheck \
    24	-E misspell \
    25	-E unconvert \
    26  -E deadcode \
    27  -E unconvert \
    28  -E gosec \
    29  -E gofmt \
    30  -E goimports \
    31  -E structcheck \
    32  -E interfacer \
    33  -E govet \
    34  -E unparam \
    35  -E megacheck \
    36  -E goconst \
    37  -E ineffassign \
    38  -E unparam \
    39  -E gocritic \
    40  -E maligned \
    41  -E typecheck \
    42  --skip-dirs vendor \
    43  --deadline 15m0s \
    44  --verbose \
    45  --build-tags build
    46

View as plain text