Skip to content

Commit

Permalink
replace individual linters with golangci
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbozhenko committed Jan 13, 2025
1 parent eb19b9b commit 436d9f1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ jobs:
- name: Run linters
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
$(exit $(go fmt -modfile=go_test.mod ./... | wc -l))
go vet -modfile=go_test.mod ./...
GOFLAGS="-mod=mod -modfile=go_test.mod" staticcheck ./...
find . -type f -name "*.go" | xargs misspell -error -locale US
golangci-lint run --timeout 5m0s ./jetstream/...
GOFLAGS="-mod=mod -modfile=go_test.mod" golangci-lint run -c .golangci.yaml --timeout 5m0s ./...
golangci-lint run -c ./jetstream/.goangci.yaml --timeout 5m0s ./jetstream/...
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,4 +68,4 @@ jobs:
if: matrix.go == '1.23'
uses: coverallsapp/github-action@v2
with:
file: acc.out
file: acc.out
44 changes: 28 additions & 16 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- linters:
- errcheck
text: "Unsubscribe"
- linters:
- errcheck
text: "Drain"
- linters:
- errcheck
text: "msg.Ack"
- linters:
- errcheck
text: "watcher.Stop"
run:
concurrency: 4
issues-exit-code: 1
tests: true
modules-download-mode: readonly

output:
formats:
- format: colored-line-number
path: stdout
print-issued-lines: true
print-linter-name: true

linters:
disable-all: true
enable:
- gofmt
- govet
- staticcheck
- misspell

linters-settings:
misspell:
locale: US

run:
timeout: 5m
modules-download-mode: mod

0 comments on commit 436d9f1

Please sign in to comment.