mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-10-24 18:37:05 +00:00
Upgrade golangci-lint to v2 for golangci-lint-action v9
golangci-lint-action >= v7 rejects golangci-lint v1, so the Lint step failed before installing. Move to golangci-lint v2.14.0 and add a v2 config that keeps the default exclusions v1 applied implicitly. Fix the one new staticcheck QF1008 finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
438c39d8e6
commit
3c1d213e95
2
.github/workflows/pull_request.yml
vendored
2
.github/workflows/pull_request.yml
vendored
|
|
@ -26,4 +26,4 @@ jobs:
|
|||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@d583c34f0599d37dbac4a198b9c83201be380893 # v9.3.0
|
||||
with:
|
||||
version: v1.52.2
|
||||
version: v2.14.0
|
||||
|
|
|
|||
10
.golangci.yml
Normal file
10
.golangci.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
version: "2"
|
||||
|
||||
linters:
|
||||
exclusions:
|
||||
# Keep the default exclusions that golangci-lint v1 applied implicitly.
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
|
|
@ -55,7 +55,7 @@ func (t *CmdTesting) Run(command string, pkgNames ...string) RunResult {
|
|||
if t.createReplayLogs {
|
||||
err := common.AppendFile(binaryName+".log", t.replayFilename)
|
||||
if err != nil {
|
||||
t.T.Fatalf("Error encountered appending log file.\n%s", err.Error())
|
||||
t.Fatalf("Error encountered appending log file.\n%s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue