Skip to content

Commit

Permalink
chore: update golangci-lint to 1.61.0 (#1318)
Browse files Browse the repository at this point in the history
Updates `golangci-lint` to the newest version v1.61.0
  • Loading branch information
cuixq authored Oct 10, 2024
1 parent ca8c00a commit c4a85bb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ runs:
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.60.1
version: v1.61.0
2 changes: 1 addition & 1 deletion internal/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func LoadImage(imagePath string) (*Image, error) {
virtualPath: virtualPath,
fileType: fileType,
isWhiteout: tombstone,
permission: fs.FileMode(header.Mode),
permission: fs.FileMode(header.Mode), //nolint:gosec
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/tui/vuln-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (d vulnListItemDelegate) Render(w io.Writer, m list.Model, index int, listI
severity := RenderSeverityShort(vuln.OSV.Severity)
str := fmt.Sprintf("%s %s %s ", cursor, id, severity)
fmt.Fprint(w, str)
fmt.Fprint(w, truncate.StringWithTail(vuln.OSV.Summary, uint(m.Width()-lipgloss.Width(str)), "…"))
fmt.Fprint(w, truncate.StringWithTail(vuln.OSV.Summary, uint(m.Width()-lipgloss.Width(str)), "…")) //nolint:gosec
}

// workaround item delegate wrapper to stop the selected item from being shown as selected
Expand Down
4 changes: 2 additions & 2 deletions pkg/grouper/grouper.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ func Group(vulns []IDAliases) []models.GroupInfo {
groups := make([]int, len(vulns))

// Initially make every vulnerability its own group.
for i := range len(vulns) {
for i := range vulns {
groups[i] = i
}

// Do a pair-wise (n^2) comparison and merge all intersecting vulns.
for i := range len(vulns) {
for i := range vulns {
for j := i + 1; j < len(vulns); j++ {
if hasAliasIntersection(vulns[i], vulns[j]) {
// Merge the two groups. Use the smaller index as the representative ID.
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_lints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -ex

go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1 run ./... --max-same-issues 0
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run ./... --max-same-issues 0

0 comments on commit c4a85bb

Please sign in to comment.