diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2aee15..d9cf585 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b with: go-version: stable - name: build @@ -24,9 +24,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b with: go-version: stable - - uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 + - uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd with: - version: v1.62.2 + version: v2.1.2 diff --git a/.golangci.yml b/.golangci.yml index e73d7c3..ee8a461 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,133 +1,147 @@ +version: "2" run: - go: '1.22' - + go: "1.23" linters: enable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - decorder - - dogsled - - dupword - - durationcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - exhaustive - - fatcontext - - forbidigo - - forcetypeassert - - gci - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoinits - - gochecksumtype - - gocognit - - gocritic - - gocyclo - - godot - - godox - - gofmt - - gofumpt - - goheader - - goimports - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosimple - - gosmopolitan - - govet - - grouper - - iface - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - ireturn - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - musttag - - nakedret - - nestif - - nilerr - - nilnil - - noctx - - nolintlint - - nonamedreturns - - nosprintfhostport - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - stylecheck - - tagalign - - tagliatelle - - tenv - - testifylint - - testpackage - - thelper - - typecheck - - unconvert - - unparam - - unused - - usestdlibvars - - wastedassign - - whitespace - - zerologlint - disable: - - cyclop - - depguard - - dupl - - exhaustruct - - funlen - - gochecknoglobals - - goconst - - lll - - nlreturn - - paralleltest - - testableexamples - - tparallel - - varnamelen - - wrapcheck - - wsl - -linters-settings: - gci: - sections: - - standard - - default - - prefix(github.com/twpayne/go-gpx) - gofumpt: - extra-rules: true - module-path: github.com/twpayne/go-gpx - goimports: - local-prefixes: github.com/twpayne/go-gpx - misspell: - locale: US - -issues: - exclude-rules: - - linters: + - asasalint + - asciicheck + - bidichk + - bodyclose + - canonicalheader + - containedctx + - contextcheck + - copyloopvar + - decorder + - dogsled + - dupword + - durationcheck - err113 - text: "do not define dynamic errors, use wrapped static errors instead" \ No newline at end of file + - errchkjson + - errname + - errorlint + - exhaustive + - exptostd + - fatcontext + - forbidigo + - forcetypeassert + - funcorder + - ginkgolinter + - gocheckcompilerdirectives + - gochecknoinits + - gochecksumtype + - gocognit + - gocritic + - gocyclo + - godot + - godox + - goheader + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosmopolitan + - grouper + - iface + - importas + - inamedparam + - interfacebloat + - intrange + - ireturn + - loggercheck + - maintidx + - makezero + - mirror + - misspell + - musttag + - nakedret + - nestif + - nilerr + - nilnesserr + - nilnil + - noctx + - nolintlint + - nonamedreturns + - nosprintfhostport + - perfsprint + - prealloc + - predeclared + - promlinter + - protogetter + - reassign + - recvcheck + - revive + - rowserrcheck + - sloglint + - spancheck + - sqlclosecheck + - staticcheck + - tagalign + - tagliatelle + - testifylint + - testpackage + - thelper + - unconvert + - unparam + - usestdlibvars + - usetesting + - wastedassign + - whitespace + - zerologlint + disable: + - cyclop + - depguard + - dupl + - exhaustruct + - funlen + - gochecknoglobals + - goconst + - lll + - nlreturn + - paralleltest + - testableexamples + - tparallel + - varnamelen + - wrapcheck + - wsl + settings: + misspell: + locale: US + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - err113 + text: do not define dynamic errors, use wrapped static errors instead + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gci + - gofmt + - gofumpt + - goimports + settings: + gci: + sections: + - standard + - default + - prefix(github.com/twpayne/go-gpx) + gofumpt: + module-path: github.com/twpayne/go-gpx + extra-rules: true + goimports: + local-prefixes: + - github.com/twpayne/go-gpx + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/go.mod b/go.mod index d4a9ea9..88fefe2 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,20 @@ module github.com/twpayne/go-gpx -go 1.22 +go 1.23.0 + +toolchain go1.24.2 require ( github.com/alecthomas/assert/v2 v2.10.0 github.com/kr/pretty v0.3.1 - github.com/twpayne/go-geom v1.5.7 - golang.org/x/net v0.33.0 + github.com/twpayne/go-geom v1.6.1 + golang.org/x/net v0.39.0 ) require ( github.com/alecthomas/repr v0.4.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/kr/text v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.13.1 // indirect - golang.org/x/text v0.21.0 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect + golang.org/x/text v0.24.0 // indirect ) diff --git a/go.sum b/go.sum index a87892a..a10c182 100644 --- a/go.sum +++ b/go.sum @@ -11,11 +11,11 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/twpayne/go-geom v1.5.7 h1:7fdceDUr03/MP7rAKOaTV6x9njMiQdxB/D0PDzMTCDc= -github.com/twpayne/go-geom v1.5.7/go.mod h1:y4fTAQtLedXW8eG2Yo4tYrIGN1yIwwKkmA+K3iSHKBA= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/twpayne/go-geom v1.6.1 h1:iLE+Opv0Ihm/ABIcvQFGIiFBXd76oBIar9drAwHFhR4= +github.com/twpayne/go-geom v1.6.1/go.mod h1:Kr+Nly6BswFsKM5sd31YaoWS5PeDDH2NftJTK7Gd028= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=