Skip to content

Commit e032696

Browse files
fix: migrate golangci-lint config to v2 and add package comment
- Add `version: "2"` to .golangci.yml (required by v2) - Move gofmt/goimports from linters to formatters section - Remove gosimple (merged into staticcheck in v2) - Lock lint CI job to golangci-lint v2 instead of latest - Add package comment to cmd/webhook/main.go (revive.package-comments) Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 12c07c7 commit e032696

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ jobs:
3030
- name: Run golangci-lint
3131
uses: golangci/golangci-lint-action@v7
3232
with:
33-
version: latest
33+
version: v2
3434
args: --timeout=3m

.golangci.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1+
version: "2"
2+
13
linters:
24
enable:
3-
- errcheck
4-
- gosimple
5-
- govet
6-
- ineffassign
7-
- staticcheck
8-
- unused
9-
- gofmt
10-
- goimports
115
- misspell
126
- revive
13-
disable-all: true
7+
8+
formatters:
9+
enable:
10+
- gofmt
11+
- goimports
1412

1513
run:
1614
timeout: 3m
17-
18-
issues:
1915
exclude-dirs:
2016
- libvgpu
2117
- vendor

cmd/webhook/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright The HAMi Authors.
33
SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
// Package main implements the mutating admission webhook for KAI resource isolator.
67
package main
78

89
import (

0 commit comments

Comments
 (0)