1- # The sections in this file are ordered in the order presented in https://golangci-lint.run/usage/configuration/.
1+ version : " 2"
2+
3+ # The sections in this file are ordered in the order presented in https://golangci-lint.run/docs/configuration/.
24# The nested fields are ordered alphabetically.
35
4- linters-settings :
5- goheader :
6- template-path : copyright_header
7- goimports :
8- local-prefixes : github.com/aws/shim-loggers-for-containerd
9- gosec :
10- config :
11- G306 : " 0o644"
12- lll :
13- # 145 is just a lax value that does not require too much work to add this check,
14- # and we don't want this to be too strict anyway.
15- line-length : 145
16- tab-width : 4
17- makezero :
18- always : true
19- nolintlint :
20- require-explanation : true
21- require-specific : true
22- stylecheck :
23- # ST1003 is left out because it is a bit opinionated.
24- checks : ["all", "-ST1003"]
25- paralleltest :
26- # Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.
27- # Default: false
28- ignore-missing : true
6+ formatters :
7+ enable :
8+ - goimports
9+ settings :
10+ goimports :
11+ local-prefixes :
12+ - github.com/aws/shim-loggers-for-containerd
13+
2914linters :
15+ default : none
3016 enable :
3117 - errname
3218 - errorlint
3319 - forcetypeassert
3420 - gocritic
3521 - godot
3622 - goheader
37- - goimports
3823 - gosec
3924 - lll
4025 - misspell
@@ -45,22 +30,44 @@ linters:
4530 - paralleltest
4631 - predeclared
4732 - revive
33+ - staticcheck
4834 - testableexamples
4935 - unconvert
5036 - unparam
5137 - usestdlibvars
5238 # TODO: Enable wastedassign after https://github.com/sanposhiho/wastedassign/issues/41 is fixed.
5339 # - wastedassign
5440 - whitespace
55- - stylecheck
56- issues :
57- exclude-rules :
58- - linters :
59- - lll
60- # A go:generate statement has to be in the same line: https://github.com/golang/go/issues/46050.
61- source : " ^//go:generate "
62- # Some checks enabled in the stylecheck setting are disabled by default
63- # (e.g., https://golangci-lint.run/usage/false-positives/#exc0013),
64- # so we need to enable them explicitly here.
65- exclude-use-default : false
66- fix : true
41+ settings :
42+ goheader :
43+ template-path : copyright_header
44+ gosec :
45+ config :
46+ G306 : " 0o644"
47+ lll :
48+ # 145 is just a lax value that does not require too much work to add this check,
49+ # and we don't want this to be too strict anyway.
50+ line-length : 145
51+ tab-width : 4
52+ makezero :
53+ always : true
54+ nolintlint :
55+ require-explanation : true
56+ require-specific : true
57+ paralleltest :
58+ # Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.
59+ # Default: false
60+ ignore-missing : true
61+ staticcheck :
62+ checks : ["all", "-ST1003"]
63+ exclusions :
64+ presets :
65+ - comments
66+ - common-false-positives
67+ - legacy
68+ - std-error-handling
69+ rules :
70+ - linters :
71+ - lll
72+ # A go:generate statement has to be in the same line: https://github.com/golang/go/issues/46050.
73+ source : " ^//go:generate "
0 commit comments