Skip to content

Commit ce2cde5

Browse files
authored
docs(linter): comment why goheader is only enabled in the CI (#101)
1 parent efa14ab commit ce2cde5

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ jobs:
2727
with:
2828
version: v1.60
2929
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.
3034
args: --enable goheader

.golangci.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ linters:
1616
- gci
1717
- gocheckcompilerdirectives
1818
- gofmt
19+
# goheader is disabled but it is enabled in the CI with a flag.
20+
# Please see .github/workflows/golangci-lint.yml which explains why.
21+
# - goheader
1922
- goimports
2023
- gomodguard
2124
- gosec
@@ -72,8 +75,8 @@ linters-settings:
7275
disabled: true
7376

7477
issues:
75-
exclude-dirs-use-default: false
76-
exclude-rules:
78+
exclude-dirs-use-default: false
79+
exclude-rules:
7780
- path-except: libevm
7881
linters:
7982
# If any issue is flagged in a non-libevm file, add the linter here
@@ -104,19 +107,19 @@ issues:
104107
- varnamelen
105108
- wastedassign
106109
- whitespace
107-
include:
108-
# Many of the default exclusions are because, verbatim "Annoying issue",
109-
# which defeats the point of a linter.
110-
- EXC0002
111-
- EXC0004
112-
- EXC0005
113-
- EXC0006
114-
- EXC0007
115-
- EXC0008
116-
- EXC0009
117-
- EXC0010
118-
- EXC0011
119-
- EXC0012
120-
- EXC0013
121-
- EXC0014
122-
- EXC0015
110+
include:
111+
# Many of the default exclusions are because, verbatim "Annoying issue",
112+
# which defeats the point of a linter.
113+
- EXC0002
114+
- EXC0004
115+
- EXC0005
116+
- EXC0006
117+
- EXC0007
118+
- EXC0008
119+
- EXC0009
120+
- EXC0010
121+
- EXC0011
122+
- EXC0012
123+
- EXC0013
124+
- EXC0014
125+
- EXC0015

0 commit comments

Comments
 (0)