Skip to content

Commit 7fc5ff8

Browse files
committed
Improve linter config
1 parent 8e1f486 commit 7fc5ff8

2 files changed

Lines changed: 21 additions & 18 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ indent_style = tab
77
insert_final_newline = true
88
trim_trailing_whitespace = true
99

10-
[*.yml]
10+
[{*.yml,*.yaml}]
1111
indent_size = 2
1212
indent_style = space

.golangci.yaml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
version: "2"
2+
run:
3+
tests: true
24
linters:
35
enable:
46
- bodyclose
@@ -19,28 +21,29 @@ linters:
1921
- usestdlibvars
2022
exclusions:
2123
generated: lax
22-
presets:
23-
- comments
24-
- common-false-positives
25-
- legacy
26-
- std-error-handling
2724
rules:
28-
- linters:
25+
- path: _test\.go$
26+
linters:
2927
- perfsprint
30-
path: _test\.go
31-
paths:
32-
- third_party$
33-
- builtin$
34-
- examples$
28+
- gosec
29+
- path: _test\.go$
30+
linters:
31+
- gosec
32+
settings:
33+
errcheck:
34+
exclude-functions:
35+
- (*os.File).Close
36+
- (*text/tabwriter.Writer).Flush
37+
- (io.Closer).Close
38+
- fmt.Fprint
39+
- fmt.Fprintf
40+
- fmt.Fprintln
41+
gosec:
42+
excludes:
43+
- G104
3544
formatters:
3645
enable:
3746
- gofumpt
3847
settings:
3948
gofumpt:
4049
module-path: pkgstats-cli
41-
exclusions:
42-
generated: lax
43-
paths:
44-
- third_party$
45-
- builtin$
46-
- examples$

0 commit comments

Comments
 (0)