From 16a7631037f1d4f8b752902fe3677f0ed97a7f62 Mon Sep 17 00:00:00 2001 From: kayrus Date: Thu, 12 Dec 2024 11:34:57 +0100 Subject: [PATCH] Bump golang to 1.23 --- .github/workflows/golangci-lint.yml | 24 ++++++ .golangci.yml | 109 ++++++++++++++++++++++++++++ README.md | 2 +- go.mod | 6 +- go.sum | 8 +- 5 files changed, 141 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/golangci-lint.yml create mode 100644 .golangci.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..00b2464 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,24 @@ +name: Golangci-lint +on: + push: + branches: + - master + pull_request: + +jobs: + golangci-lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Checkout + uses: actions/checkout@v4 + + - name: Golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: 'v1.62' diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..2620b66 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,109 @@ +run: + deadline: 5m + +linters-settings: + staticcheck: + go: '1.23' + stylecheck: + go: '1.23' + gci: + local-prefixes: github.com/kayrus + goimports: + local-prefixes: github.com/kayrus + depguard: + rules: + prevent_unmaintained_packages: + list-mode: lax + files: + - $all + - "!$test" + deny: + - pkg: io/ioutil + desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil" + +linters: + fast: false + disable-all: true + enable: + - asciicheck + - bodyclose + - depguard + - dogsled + - errcheck + - exhaustive + - exportloopref + - gci + - godot + - gofmt + - goheader + - goimports + - gomodguard + - goprintffuncname + - govet + - ineffassign + - misspell + - nakedret + - nolintlint + - prealloc + - staticcheck + - stylecheck + - typecheck + - unconvert + - unused + - whitespace +# - cyclop +# - dupl +# - durationcheck +# - errname +# - errorlint +# - exhaustivestruct +# - forbidigo +# - forcetypeassert +# - funlen +# - gochecknoglobals +# - gochecknoinits +# - gocognit +# - goconst +# - gocritic +# - gocyclo +# - godox +# - goerr113 +# - gofumpt +# - golint +# - gomnd +# - gomoddirectives +# - gosec (gas) +# - gosimple (megacheck) +# - ifshort +# - importas +# - interfacer +# - lll +# - makezero +# - maligned +# - nestif +# - nilerr +# - nlreturn +# - noctx +# - paralleltest +# - predeclared +# - promlinter +# - revive +# - scopelint +# - sqlclosecheck +# - tagliatelle +# - testpackage +# - thelper +# - tparallel +# - unparam +# - wastedassign +# - wrapcheck +# - wsl + +issues: + exclude-rules: + - linters: + - staticcheck + text: "SA1019:" + - linters: + - stylecheck + text: "ST1005:" diff --git a/README.md b/README.md index 9a0b932..e13c0af 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # putty -Go package to parse PuTTY private key formats. Go 1.22 or above is required. +Go package to parse PuTTY private key formats. Go 1.23 or above is required. ## Example diff --git a/go.mod b/go.mod index 14c5b09..13a8ae0 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/kayrus/putty -go 1.22 +go 1.23 -require golang.org/x/crypto v0.25.0 +require golang.org/x/crypto v0.31.0 -require golang.org/x/sys v0.22.0 // indirect +require golang.org/x/sys v0.28.0 // indirect diff --git a/go.sum b/go.sum index c339b1b..0b273f9 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=