Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(linter): comment why goheader is only enabled in the CI #101

Merged
merged 1 commit into from
Jan 9, 2025
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: 4 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ jobs:
with:
version: v1.60
only-new-issues: true
# The goheader linter is enabled so that it runs only on modified or new files
# (see only-new-issues: true). Note it is disabled in .golangci.yml because
# golangci-lint is not aware of new/modified files compared to the last git commit,
# and we want to avoid reporting invalid goheader errors when running the linter locally.
args: --enable goheader
39 changes: 21 additions & 18 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ linters:
- gci
- gocheckcompilerdirectives
- gofmt
# goheader is disabled but it is enabled in the CI with a flag.
# Please see .github/workflows/golangci-lint.yml which explains why.
# - goheader
- goimports
- gomodguard
- gosec
Expand Down Expand Up @@ -72,8 +75,8 @@ linters-settings:
disabled: true

issues:
exclude-dirs-use-default: false
exclude-rules:
exclude-dirs-use-default: false
exclude-rules:
- path-except: libevm
linters:
# If any issue is flagged in a non-libevm file, add the linter here
Expand Down Expand Up @@ -104,19 +107,19 @@ issues:
- varnamelen
- wastedassign
- whitespace
include:
# Many of the default exclusions are because, verbatim "Annoying issue",
# which defeats the point of a linter.
- EXC0002
- EXC0004
- EXC0005
- EXC0006
- EXC0007
- EXC0008
- EXC0009
- EXC0010
- EXC0011
- EXC0012
- EXC0013
- EXC0014
- EXC0015
include:
# Many of the default exclusions are because, verbatim "Annoying issue",
# which defeats the point of a linter.
- EXC0002
- EXC0004
- EXC0005
- EXC0006
- EXC0007
- EXC0008
- EXC0009
- EXC0010
- EXC0011
- EXC0012
- EXC0013
- EXC0014
- EXC0015
Loading