Skip to content

Commit a9dffc6

Browse files
committed
chore(ci): linting job steps changes
- golangci-lint runs as configured in .golangci.yml - goheader runs separately on new issues only
1 parent e2b0abb commit a9dffc6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ jobs:
2222
- uses: actions/setup-go@v5
2323
with:
2424
go-version: stable
25-
- name: golangci-lint
25+
- name: goheader
26+
# The goheader linter is only enabled in the CI so that it runs only on modified or new files
27+
# (see only-new-issues: true). It is disabled in .golangci.yml because
28+
# golangci-lint running locally is not aware of new/modified files compared to the base
29+
# commit of a pull request, and we want to avoid reporting invalid goheader errors.
2630
uses: golangci/golangci-lint-action@v6
2731
with:
2832
version: v1.60
2933
only-new-issues: true
30-
# The goheader linter is enabled so that it runs only on modified or new files
31-
# (see only-new-issues: true). Note it is disabled in .golangci.yml because
32-
# golangci-lint is not aware of new/modified files compared to the last git commit,
33-
# and we want to avoid reporting invalid goheader errors when running the linter locally.
34-
args: --enable goheader
34+
args: --enable-only goheader
35+
- name: golangci-lint
36+
uses: golangci/golangci-lint-action@v6
37+
with:
38+
version: v1.60

0 commit comments

Comments
 (0)