diff --git a/.github/workflows/go-vet.yml b/.github/workflows/go-vet.yml index 9eae76d..ed30d12 100644 --- a/.github/workflows/go-vet.yml +++ b/.github/workflows/go-vet.yml @@ -9,16 +9,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@master with: - go-version: ^1.18 + go-version: "1.20" - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@master - name: Get dependencies - run: | - go get -v -t -d ./... + run: go mod tidy - name: Build run: go build -v ./... @@ -30,8 +29,15 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + - name: Set up Go 1.x + uses: actions/setup-go@master with: - version: latest \ No newline at end of file + go-version: "1.20" + + - name: Check out code into the Go module directory + uses: actions/checkout@master + + - name: golangci-lint + uses: golangci/golangci-lint-action@master + with: + version: latest diff --git a/.golangci.yml b/.golangci.yml index 2a842a9..e247552 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,10 +6,6 @@ linters-settings: goimports: local-prefixes: github.com/fumiama/ReiBot - gocritic: - disabled-checks: - - exitAfterDefer - linters: # please, do not use `enable-all`: it's deprecated and will be removed soon. # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint @@ -17,42 +13,38 @@ linters: fast: false enable: - bodyclose - - deadcode - - depguard + #- depguard - dogsled - - dupl - errcheck - - exportloopref + #- exportloopref - exhaustive #- funlen #- goconst - #- gocritic + - gocritic #- gocyclo - - gofumpt + - gofmt - goimports - goprintffuncname #- gosec - gosimple - govet - ineffassign - - misspell + #- misspell - nolintlint - rowserrcheck - staticcheck - - structcheck - #- stylecheck + - stylecheck - typecheck - unconvert - unparam - unused - - varcheck - whitespace - prealloc - predeclared - asciicheck - #- revive + - revive + - forbidigo - makezero - - interfacer run: @@ -61,10 +53,12 @@ run: deadline: 5m issues-exit-code: 1 tests: false + go: '1.20' # output configuration options output: - format: 'colored-line-number' + formats: + - format: "colored-line-number" print-issued-lines: true print-linter-name: true uniq-by-line: true