Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golangci-lint: update to latest version & related tweaks #5737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ issues:
- testdata$
- test/mock
exclude-files:
- ".*\\.pb\\.go"
- ".*\\.pb\\.go$"
exclude-rules:
- linters: [ staticcheck ]
path: ".*_test\\.go$"
text: "Subjects has been deprecated since Go 1\\.18.*Subjects will not include the system roots"

linters:
enable:
Expand All @@ -32,3 +36,6 @@ linters-settings:
rules:
- name: unused-parameter
disabled: true
gosec:
excludes:
- G115 # "Potential integer overflow when converting between integer types"; TODO re-enable eventually
2 changes: 1 addition & 1 deletion .spire-tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
golangci_lint v1.60.1
golangci_lint v1.62.2
markdown_lint v0.37.0
protoc 24.4
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ endif
lint: lint-code lint-md

lint-code: $(golangci_lint_bin)
$(E)PATH="$(go_bin_dir):$(PATH)" GOLANGCI_LINT_CACHE="$(golangci_lint_cache)" $(golangci_lint_bin) run ./...
$(E)PATH="$(go_bin_dir):$(PATH)" GOLANGCI_LINT_CACHE="$(golangci_lint_cache)" $(golangci_lint_bin) run --max-issues-per-linter=0 --max-same-issues=0 ./...

lint-md:
$(E)docker run --rm -v "$(DIR):/workdir" $(markdown_lint_image) "**/*.md"
Expand Down
Loading