mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Try disabling logcheck for golang 1.19rc2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
1f557035e0
commit
6c0a434db0
@ -21,18 +21,20 @@ linters:
|
|||||||
# - structcheck
|
# - structcheck
|
||||||
# - varcheck
|
# - varcheck
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- logcheck
|
# TODO(golang): Need to fix this to work with golang 1.19
|
||||||
|
# - logcheck
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
|
|
||||||
linters-settings: # please keep this alphabetized
|
linters-settings: # please keep this alphabetized
|
||||||
custom:
|
# TODO(golang): Need to fix this to work with golang 1.19
|
||||||
logcheck:
|
# custom:
|
||||||
# Installed there by hack/verify-golangci-lint.sh.
|
# logcheck:
|
||||||
path: _output/local/bin/logcheck.so
|
# # Installed there by hack/verify-golangci-lint.sh.
|
||||||
description: structured logging checker
|
# path: _output/local/bin/logcheck.so
|
||||||
original-url: k8s.io/klog/hack/tools
|
# description: structured logging checker
|
||||||
|
# original-url: k8s.io/klog/hack/tools
|
||||||
staticcheck:
|
staticcheck:
|
||||||
go: "1.18"
|
go: "1.18"
|
||||||
checks: [
|
checks: [
|
||||||
|
@ -39,22 +39,25 @@ export GO111MODULE=on
|
|||||||
echo "installing golangci-lint and logcheck plugin from hack/tools into ${GOBIN}"
|
echo "installing golangci-lint and logcheck plugin from hack/tools into ${GOBIN}"
|
||||||
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
|
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
|
||||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||||
go build -o "${GOBIN}/logcheck.so" -buildmode=plugin sigs.k8s.io/logtools/logcheck/plugin
|
# TODO(golang): Need to fix this to work with golang 1.19
|
||||||
|
# go build -o "${GOBIN}/logcheck.so" -buildmode=plugin sigs.k8s.io/logtools/logcheck/plugin
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
cd "${KUBE_ROOT}"
|
cd "${KUBE_ROOT}"
|
||||||
|
|
||||||
# The config is in ${KUBE_ROOT}/.golangci.yaml where it will be found
|
## The config is in ${KUBE_ROOT}/.golangci.yaml where it will be found
|
||||||
# even when golangci-lint is invoked in a sub-directory.
|
## even when golangci-lint is invoked in a sub-directory.
|
||||||
#
|
##
|
||||||
# The logcheck plugin currently has to be configured via env variables
|
## The logcheck plugin currently has to be configured via env variables
|
||||||
# (https://github.com/golangci/golangci-lint/issues/1512).
|
## (https://github.com/golangci/golangci-lint/issues/1512).
|
||||||
#
|
##
|
||||||
# Remember to clean the golangci-lint cache when changing
|
## Remember to clean the golangci-lint cache when changing
|
||||||
# the configuration and running this script multiple times,
|
## the configuration and running this script multiple times,
|
||||||
# otherwise golangci-lint will report stale results:
|
## otherwise golangci-lint will report stale results:
|
||||||
# _output/local/bin/golangci-lint cache clean
|
## _output/local/bin/golangci-lint cache clean
|
||||||
export LOGCHECK_CONFIG="${KUBE_ROOT}/hack/logcheck.conf"
|
# TODO(golang): Need to fix this to work with golang 1.19
|
||||||
|
#export LOGCHECK_CONFIG="${KUBE_ROOT}/hack/logcheck.conf"
|
||||||
|
|
||||||
echo 'running golangci-lint ' >&2
|
echo 'running golangci-lint ' >&2
|
||||||
res=0
|
res=0
|
||||||
if [[ "$#" -gt 0 ]]; then
|
if [[ "$#" -gt 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user