diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca030c7..f67496a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - uses: rlespinasse/github-slug-action@v4 - uses: actions/setup-go@v2 with: - go-version: ^1.18 + go-version: ^1.20 - run: cd /tmp && go install github.com/Antonboom/nilnil@${{ env.GITHUB_REF_NAME }} && nilnil -h lint: @@ -29,7 +29,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: ^1.18 + go-version: ^1.20 - uses: actions/checkout@v2 - run: go test -coverprofile=coverage.out ./... - uses: shogo82148/actions-goveralls@v1 diff --git a/.golangci.yml b/.golangci.yml index f245c0d..773134f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,19 +14,22 @@ linters-settings: linters: disable-all: true enable: + - asasalint + - bidichk - asciicheck - bodyclose - - deadcode - depguard - dogsled - dupl - durationcheck - errcheck + - errchkjson - errname - exhaustive - exportloopref - forbidigo - gci + - gocheckcompilerdirectives - goconst - gocritic - gocyclo @@ -42,13 +45,13 @@ linters: - gosec - gosimple - govet - - ifshort - importas - ineffassign - nilnil - lll - makezero - misspell + - musttag - nakedret - nilerr - nestif @@ -56,18 +59,20 @@ linters: - nolintlint - prealloc - predeclared + - reassign - revive - - rowserrcheck - sqlclosecheck - staticcheck - - structcheck - stylecheck - tagliatelle + - tenv + - testableexamples - thelper + - tparallel - typecheck - unconvert - unparam - unused - - varcheck + - usestdlibvars - wastedassign - whitespace diff --git a/Taskfile.yml b/Taskfile.yml index 48418e2..c7ed787 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -27,7 +27,7 @@ tasks: cmds: - echo "Fmt..." - gofumpt -w . - - gci write -s Std -s Def -s "Prefix(github.com/Antonboom/nilnil)" . 2> /dev/null + - gci write -s standard -s default -s "Prefix(github.com/Antonboom/nilnil)" . 2> /dev/null lint: cmds: diff --git a/go.mod b/go.mod index 59b8d4d..35fe483 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,10 @@ module github.com/Antonboom/nilnil -go 1.18 +go 1.20 -require golang.org/x/tools v0.1.10 +require golang.org/x/tools v0.6.0 require ( - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/sys v0.5.0 // indirect ) diff --git a/go.sum b/go.sum index 0609eb7..44d387e 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,7 @@ -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12 h1:QyVthZKMsyaQwBTJE04jdNN0Pp5Fn9Qga0mrgxyERQM= -golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=