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
|
- name: Install golangci-lint
|
||||||
run: |
|
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
|
- name: Run golangci-lint
|
||||||
run: golangci-lint run ./... --timeout 5m
|
run: golangci-lint run ./... --timeout 5m
|
||||||
|
|||||||
+17
-21
@@ -1,36 +1,32 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
|
default: none
|
||||||
enable:
|
enable:
|
||||||
- errcheck
|
- errcheck
|
||||||
- govet
|
- govet
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- unused
|
- unused
|
||||||
- gosimple
|
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- typecheck
|
- typecheck
|
||||||
- gocritic
|
- gocritic
|
||||||
- gosec
|
- gosec
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- noctx
|
- noctx
|
||||||
disable:
|
settings:
|
||||||
- structcheck # deprecated
|
errcheck:
|
||||||
- deadcode # deprecated
|
check-type-assertions: true
|
||||||
- varcheck # deprecated
|
gocritic:
|
||||||
|
enabled-tags:
|
||||||
linters-settings:
|
- diagnostic
|
||||||
errcheck:
|
- performance
|
||||||
check-type-assertions: true
|
gosec:
|
||||||
gocritic:
|
excludes:
|
||||||
enabled-tags:
|
- G104 # Audit errors not checked (we have intentional fire-and-forget patterns)
|
||||||
- diagnostic
|
- G304 # File inclusion via variable (needed for config-driven file paths)
|
||||||
- performance
|
exclusions:
|
||||||
gosec:
|
max-issues-per-linter: 50
|
||||||
excludes:
|
max-same-issues: 5
|
||||||
- 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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user