Skip to content

Commit 0cb0744

Browse files
committed
Update "golangci-lint" to 2.3
Support for "golangci-lint" 1.x was dropped starting from version 7.0.0 of the "golangci/golangci-lint-action" GitHub Actions action. The version of "golangci-lint" used by the "Check Go" GitHub Actions workflow is hereby updated to 2.3.x. Changes to the asset "golangci-lint" configuration file were required to accommodate the bump to 2.x: * Addition of `version` key. * Removal of `issues.exclude-use-default` key. The latter is no longer supported because the "golangci-lint" finally came to their senses and stopped disabling arbitrary rules by default. Disabling of rules is now only done when explicitly configured. Since the `issues.exclude-use-default` key in the asset was used only to enable the rules that "golangci-lint" 1.x disabled by default, the equivalent configuration for "golangci-lint" 2.x is achieved by simply removing this key from the configuration file.
1 parent 9217a6d commit 0cb0744

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go/.golangci.yml
22
# See: https://golangci-lint.run/usage/configuration/
3-
issues:
4-
exclude-use-default: false
3+
version: "2"
54
linters:
65
enable:
76
- revive

workflow-templates/check-go-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
- name: Install golangci-lint
125125
uses: golangci/golangci-lint-action@v8
126126
with:
127-
version: v1.54
127+
version: v2.3
128128

129129
- name: Check style
130130
env:

0 commit comments

Comments
 (0)