M .golangci.yml => .golangci.yml +12 -4
@@ 29,7 29,8 @@ issues:
'(add-constant: (avoid magic numbers like|string literal "")|cyclomatic: function parseOpts|deep-exit: calls to log\.Panicf? only in main)'
- linters: [revive]
path: _test\.go
- text: '^add-constant: '
+ # tests can have magic vals and up to 5 function args
+ text: '^(add-constant: |argument-limit: maximum number of arguments per function exceeded; max 4 but got 5)'
# parseOpts length is soley determined by cli flag count.
- linters: [funlen, cyclop]
path: cmd/
@@ 112,7 113,7 @@ linters:
- whitespace
- wrapcheck
- wsl
- # - gomodguard
+ # - gomodguard # obsoleted by go-arch-lint
# - paralleltest # not always relevant
# - tenv # only for go117+
# - scopelint # deprecated
@@ 137,18 138,25 @@ linters-settings:
- performance
- experimental
- opinionated
+ disabled-checks:
+ - ioutilDeprecated # moac should work in Go 1.15+
settings:
captLocal:
paramsOnly: false
elseif:
skipBalanced: false
hugeParam:
- sizeThreshold: 60
+ sizeThreshold: 64
rangeExprCopy:
sizeThreshold: 128
skipTestFuncs: false
+ rangeValCopy:
+ sizeThreshold: 96
+ skipTestFuncs: false
nestingReduce:
bodyWidth: 3
+ truncateCmp:
+ skipArchDependent: false
gomnd:
settings:
mnd:
@@ 182,7 190,7 @@ linters-settings:
rules:
- name: add-constant
- name: argument-limit
- arguments: [5]
+ arguments: [4]
- name: atomic
- name: bare-return
- name: blank-imports
M go.mod => go.mod +1 -1
@@ 5,6 5,6 @@ go 1.15
require (
git.sr.ht/~sircmpwn/getopt v1.0.0
github.com/rogpeppe/go-internal v1.8.1-0.20210923151022-86f73c517451
- golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef // indirect
+ golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
)
M go.sum => go.sum +2 -4
@@ 17,10 17,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211002104244-808efd93c36d h1:SABT8Vei3iTiu+Gy8KOzpSNz+W1EQ5YBCRtiEETxF+0=
-golang.org/x/sys v0.0.0-20211002104244-808efd93c36d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef h1:fPxZ3Umkct3LZ8gK9nbk+DWDJ9fstZa2grBn+lWVKPs=
-golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 h1:M69LAlWZCshgp0QSzyDcSsSIejIEeuaCVpmwcKwyLMk=
+golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=