Skip to content

Commit 6459a00

Browse files
committed
Linter configuration for golangci-lint added
This is motivated by #89 to document the target baseline for linting. It intentionally avoids enforcing linting for changes prior to the introduction of this configuration so that the project can be incrementally brought in line. Each linter is explicitly enabled so there are no surprises if the defaults are changed. Only simple formatters are included since the needs of this project are relatively simple.
1 parent ea5ac7e commit 6459a00

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.golangci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Configuration of formatting and linting using https://golangci-lint.run/.
2+
version: "2"
3+
4+
linters:
5+
default: none
6+
enable:
7+
- errcheck
8+
- govet
9+
- ineffassign
10+
- staticcheck
11+
- unused
12+
13+
formatters:
14+
enable:
15+
- gofmt
16+
- goimports
17+
18+
issues:
19+
# Show only new issues created after the introduction of the linter.
20+
new-from-rev: ea5ac7e13561f6334938261321e13a725d1c0180
21+
22+
# Show issues in any part of update files (requires new-from-rev or new-from-patch).
23+
whole-files: true

0 commit comments

Comments
 (0)