mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
[golang] Fix things commented out in 1.19rc2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
305ad47627
commit
a2408f39c7
@ -21,20 +21,18 @@ linters:
|
|||||||
# - structcheck
|
# - structcheck
|
||||||
# - varcheck
|
# - varcheck
|
||||||
- ineffassign
|
- ineffassign
|
||||||
# TODO(golang): Need to fix this to work with golang 1.19
|
- logcheck
|
||||||
# - logcheck
|
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
|
|
||||||
linters-settings: # please keep this alphabetized
|
linters-settings: # please keep this alphabetized
|
||||||
# TODO(golang): Need to fix this to work with golang 1.19
|
custom:
|
||||||
# custom:
|
logcheck:
|
||||||
# logcheck:
|
# Installed there by hack/verify-golangci-lint.sh.
|
||||||
# # Installed there by hack/verify-golangci-lint.sh.
|
path: _output/local/bin/logcheck.so
|
||||||
# path: _output/local/bin/logcheck.so
|
description: structured logging checker
|
||||||
# description: structured logging checker
|
original-url: k8s.io/klog/hack/tools
|
||||||
# original-url: k8s.io/klog/hack/tools
|
|
||||||
staticcheck:
|
staticcheck:
|
||||||
go: "1.18"
|
go: "1.18"
|
||||||
checks: [
|
checks: [
|
||||||
|
@ -105,9 +105,8 @@ dependencies:
|
|||||||
version: 1.19
|
version: 1.19
|
||||||
refPaths:
|
refPaths:
|
||||||
- path: build/build-image/cross/VERSION
|
- path: build/build-image/cross/VERSION
|
||||||
# TODO(dims): Uncomment once images are updated to go1.19
|
- path: hack/lib/golang.sh
|
||||||
#- path: hack/lib/golang.sh
|
match: minimum_go_version=go([0-9]+\.[0-9]+)
|
||||||
# match: minimum_go_version=go([0-9]+\.[0-9]+)
|
|
||||||
|
|
||||||
- name: "registry.k8s.io/kube-cross: dependents"
|
- name: "registry.k8s.io/kube-cross: dependents"
|
||||||
version: v1.25.0-go1.19-bullseye.0
|
version: v1.25.0-go1.19-bullseye.0
|
||||||
|
@ -482,8 +482,7 @@ EOF
|
|||||||
local go_version
|
local go_version
|
||||||
IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)"
|
IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)"
|
||||||
local minimum_go_version
|
local minimum_go_version
|
||||||
# TODO(dims): Need to switch this to 1.19 once we update images to newer go version
|
minimum_go_version=go1.19
|
||||||
minimum_go_version=go1.18.1
|
|
||||||
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
|
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
|
||||||
kube::log::usage_from_stdin <<EOF
|
kube::log::usage_from_stdin <<EOF
|
||||||
Detected go version: ${go_version[*]}.
|
Detected go version: ${go_version[*]}.
|
||||||
|
@ -39,8 +39,7 @@ 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
|
||||||
# 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
|
||||||
# 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}"
|
||||||
@ -55,8 +54,7 @@ cd "${KUBE_ROOT}"
|
|||||||
## 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
|
||||||
# TODO(golang): Need to fix this to work with golang 1.19
|
export LOGCHECK_CONFIG="${KUBE_ROOT}/hack/logcheck.conf"
|
||||||
#export LOGCHECK_CONFIG="${KUBE_ROOT}/hack/logcheck.conf"
|
|
||||||
|
|
||||||
echo 'running golangci-lint ' >&2
|
echo 'running golangci-lint ' >&2
|
||||||
res=0
|
res=0
|
||||||
|
Loading…
Reference in New Issue
Block a user