From ebca883c0044b70ebe1f70b376ca7a42d2fcaa0f Mon Sep 17 00:00:00 2001 From: Will Daly Date: Tue, 3 Dec 2024 10:07:14 -0800 Subject: [PATCH] deps: bump golangci-lint version to 1.62 in GH actions (#1096) # Description Bump version of golangci-lint used in GH actions to 1.62 ## Related Issue Fix for false positive typecheck error in https://github.com/microsoft/retina/pull/962#discussion_r1831755266 ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed N/A ## Additional Notes N/A --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. --------- Signed-off-by: Will Daly --- .github/workflows/golangci-lint.yaml | 2 +- .golangci.yaml | 6 +++--- pkg/plugin/linuxutil/Makefile | 2 +- ..._mock_generated.go => linuxutil_mock_generated_linux.go} | 2 +- pkg/plugin/linuxutil/types_linux.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename pkg/plugin/linuxutil/{linuxutil_mock_generated.go => linuxutil_mock_generated_linux.go} (99%) diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 51803a18c2..07c435e928 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -32,7 +32,7 @@ jobs: if: env.IS_NOT_MERGE_GROUP uses: golangci/golangci-lint-action@v6 with: - version: v1.55 + version: v1.62 args: --concurrency 4 --verbose --config=.golangci.yaml --timeout=25m only-new-issues: true skip-cache: true diff --git a/.golangci.yaml b/.golangci.yaml index 41fa4cb1df..ac2fcf58d3 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -7,12 +7,12 @@ issues: - path: pkg/metrics/types_windows.go linters: - revive - - gomnd + - mnd - var-naming - path: pkg/metrics/types_linux.go linters: - revive - - gomnd + - mnd - var-naming linters: presets: @@ -31,7 +31,7 @@ linters: - gocritic - gocyclo - gofmt - - gomnd + - mnd - goprintffuncname - gosimple - lll diff --git a/pkg/plugin/linuxutil/Makefile b/pkg/plugin/linuxutil/Makefile index ae7d95223b..aed4b1b873 100644 --- a/pkg/plugin/linuxutil/Makefile +++ b/pkg/plugin/linuxutil/Makefile @@ -5,7 +5,7 @@ MOCKGEN = $(TOOLS_BIN_DIR)/mockgen .PHONY: generate generate: $(MOCKGEN) ## Generate mock clients - $(MOCKGEN) -source=$(REPO_ROOT)/pkg/plugin/linuxutil/types_linux.go -copyright_file=$(REPO_ROOT)/pkg/lib/ignore_headers.txt -package=linuxutil > linuxutil_mock_generated.go + $(MOCKGEN) -source=$(REPO_ROOT)/pkg/plugin/linuxutil/types_linux.go -copyright_file=$(REPO_ROOT)/pkg/lib/ignore_headers.txt -package=linuxutil > linuxutil_mock_generated_linux.go $(MOCKGEN): @make -C $(REPO_ROOT) $(MOCKGEN) diff --git a/pkg/plugin/linuxutil/linuxutil_mock_generated.go b/pkg/plugin/linuxutil/linuxutil_mock_generated_linux.go similarity index 99% rename from pkg/plugin/linuxutil/linuxutil_mock_generated.go rename to pkg/plugin/linuxutil/linuxutil_mock_generated_linux.go index 225be69fe1..c635ee37e9 100644 --- a/pkg/plugin/linuxutil/linuxutil_mock_generated.go +++ b/pkg/plugin/linuxutil/linuxutil_mock_generated_linux.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -source=types_linux.go -destination=linuxutil_mock_generated.go -package=linuxutil +// mockgen -source=types_linux.go -destination=linuxutil_mock_generated_linux.go -package=linuxutil // // Package linuxutil is a generated GoMock package. diff --git a/pkg/plugin/linuxutil/types_linux.go b/pkg/plugin/linuxutil/types_linux.go index 7eda664b3c..acd1b55b14 100644 --- a/pkg/plugin/linuxutil/types_linux.go +++ b/pkg/plugin/linuxutil/types_linux.go @@ -13,7 +13,7 @@ const ( Name api.PluginName = "linuxutil" ) -//go:generate go run go.uber.org/mock/mockgen@v0.4.0 -source=types_linux.go -destination=linuxutil_mock_generated.go -package=linuxutil +//go:generate go run go.uber.org/mock/mockgen@v0.4.0 -source=types_linux.go -destination=linuxutil_mock_generated_linux.go -package=linuxutil type linuxUtil struct { cfg *kcfg.Config l *log.ZapLogger