golangci-lint: inline logcheck configuration

This has the advantage that the golangci-lint cache gets invalidated
automatically each time the logcheck config changes.
This commit is contained in:
Patrick Ohly
2023-06-06 11:26:57 +02:00
parent 49084fe577
commit b450224c12
6 changed files with 137 additions and 10 deletions

View File

@@ -49,15 +49,7 @@ export GOBIN="${KUBE_OUTPUT_BINPATH}"
PATH="${GOBIN}:${PATH}"
invocation=(./hack/verify-golangci-lint.sh "$@")
# The logcheck plugin currently has to be configured via env variables
# (https://github.com/golangci/golangci-lint/issues/1512).
#
# Remember to clean the golangci-lint cache when changing
# the configuration and running this script multiple times,
# otherwise golangci-lint will report stale results:
# _output/local/bin/golangci-lint cache clean
golangci=(env LOGCHECK_CONFIG="${KUBE_ROOT}/hack/logcheck.conf" "${GOBIN}/golangci-lint" run)
golangci=("${GOBIN}/golangci-lint" run)
golangci_config="${KUBE_ROOT}/hack/golangci.yaml"
base=
strict=