Skip to content

Commit be6e93e

Browse files
authored
chore(ci): linting job changes regarding goheader (#116)
`goheader` only needs to be run on files changed in the current PR as it will otherwise suggest updating copyright years on untouched files. The other linters, however, should be run in the same manner as a local invocation
1 parent ee93f60 commit be6e93e

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)