diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 11760c0d..53525945 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,9 +12,9 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run golangci-lint - uses: golangci/golangci-lint-action@v2.5.2 + uses: golangci/golangci-lint-action@v7 with: - version: latest + version: v2.1 args: -c .golangci.yml diff --git a/.golangci.yml b/.golangci.yml index fb6921ba..3f666979 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,28 +1,41 @@ +version: "2" run: timeout: 1m - skip-dirs: - - data +formatters: + enable: + - gofmt + - goimports linters: + default: none + exclusions: + generated: lax + paths: + - data + - search/align/matrix/matrix_test.go + - seqhash/seqhash.go + rules: + - path: search/align/example_test.go + linters: + - nolintlint enable: - bodyclose - dupl - - exportloopref + - copyloopvar - gochecknoinits # - goconst # TODO: Enable this and fix the errors. - - gofmt - - goimports - goprintffuncname - misspell - nakedret - nilnil - noctx - nolintlint - - stylecheck + - staticcheck - unconvert - unparam -linters-settings: - stylecheck: - # https://staticcheck.io/docs/options#checks - checks: - - "all" - - "-ST1005" # Disable "Incorrectly formatted error string" errors. TODO: Enable this and fix the errors. \ No newline at end of file + settings: + dupl: + threshold: 500 + staticcheck: + checks: + - "ST*" + - "-ST1005" \ No newline at end of file