Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
working-directory: src/github.com/containerd/release-tool

- name: Linter
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: v1.64.2
version: v2.3.1
working-directory: src/github.com/containerd/release-tool

- name: Unit Test
Expand Down
55 changes: 25 additions & 30 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,37 @@
version: "2"
linters:
enable:
- copyloopvar # Checks for loop variable copies in Go 1.22+
- gofmt
- goimports
- copyloopvar
- dupword
- gosec
- ineffassign
- misspell
- nolintlint
- revive
- staticcheck
- unconvert
- unused
- govet
- dupword # Checks for duplicate words in the source code
disable:
- errcheck

settings:
gosec:
excludes:
- G204
- G305
- G306
- G402
- G404
- G115
nolintlint:
allow-unused: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
issues:
include:
- EXC0002
max-issues-per-linter: 0
max-same-issues: 0

linters-settings:
gosec:
# The following issues surfaced when `gosec` linter
# was enabled. They are temporarily excluded to unblock
# the existing workflow, but still to be addressed by
# future works.
excludes:
- G204
- G305
- G306
- G402
- G404
- G115
nolintlint:
allow-unused: true

run:
timeout: 2m
formatters:
enable:
- gofmt
- goimports
5 changes: 3 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,10 @@ func resolveGitURL(name string, cache Cache) (string, error) {
name, content string
)
for _, attr := range tok.Attr {
if attr.Key == "name" {
switch attr.Key {
case "name":
name = attr.Val
} else if attr.Key == "content" {
case "content":
content = attr.Val
}
}
Expand Down
Loading