mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 14:11:31 +00:00
fix(ci): upgrade golangci-lint v1.62.2 to v2.11.4 for Go 1.25 support
The old v1 binary was built with Go 1.23 and rejected Go 1.25 targets. Migrated .golangci.yml to v2 format: added version field, moved linters-settings under linters.settings, removed deprecated linters (structcheck/deadcode/varcheck), merged gosimple into staticcheck. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ jobs:
|
||||
|
||||
- name: Install golangci-lint
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.62.2
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.4
|
||||
|
||||
- name: Run golangci-lint
|
||||
run: golangci-lint run ./... --timeout 5m
|
||||
|
||||
+17
-21
@@ -1,36 +1,32 @@
|
||||
version: "2"
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
|
||||
linters:
|
||||
default: none
|
||||
enable:
|
||||
- errcheck
|
||||
- govet
|
||||
- staticcheck
|
||||
- unused
|
||||
- gosimple
|
||||
- ineffassign
|
||||
- typecheck
|
||||
- gocritic
|
||||
- gosec
|
||||
- bodyclose
|
||||
- noctx
|
||||
disable:
|
||||
- structcheck # deprecated
|
||||
- deadcode # deprecated
|
||||
- varcheck # deprecated
|
||||
|
||||
linters-settings:
|
||||
errcheck:
|
||||
check-type-assertions: true
|
||||
gocritic:
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
- performance
|
||||
gosec:
|
||||
excludes:
|
||||
- G104 # Audit errors not checked (we have intentional fire-and-forget patterns)
|
||||
- G304 # File inclusion via variable (needed for config-driven file paths)
|
||||
|
||||
issues:
|
||||
max-issues-per-linter: 50
|
||||
max-same-issues: 5
|
||||
settings:
|
||||
errcheck:
|
||||
check-type-assertions: true
|
||||
gocritic:
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
- performance
|
||||
gosec:
|
||||
excludes:
|
||||
- G104 # Audit errors not checked (we have intentional fire-and-forget patterns)
|
||||
- G304 # File inclusion via variable (needed for config-driven file paths)
|
||||
exclusions:
|
||||
max-issues-per-linter: 50
|
||||
max-same-issues: 5
|
||||
|
||||
Reference in New Issue
Block a user