hack: integrate logcheck into golangci-lint

Running logcheck as part of golangci-lint has several advantages:
- faster checking because finding files and parsing is shared
  with other linters
- gets rid of the complex and buggy
  hack/verify-structured-logging.sh (https://github.com/kubernetes/kubernetes/issues/106746)
- support for // nolint:logcheck
- works with Go 1.18
This commit is contained in:
Patrick Ohly
2022-01-25 11:02:09 +01:00
parent edffc700a4
commit 17e3c555c5
8 changed files with 45 additions and 118 deletions

View File

@@ -35,7 +35,6 @@ EXCLUDED_PATTERNS=(
"verify-linkcheck.sh" # runs in separate Jenkins job once per day due to high network usage
"verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized
"verify-govet-levee.sh" # Do not run levee analysis by default while KEP-1933 implementation is in alpha.
"verify-structured-logging.sh" # TODO(dims) Need to get this running with golang 1.18
)
# Exclude generated-files-remake in certain cases, if they're running in a separate job.