Skip to content

Commit

Permalink
chore: add lints in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
CriticalNoob02 committed Aug 26, 2024
1 parent 00cc702 commit ff7e7f0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,18 @@ jobs:
with:
reviewdog_version: latest

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run Staticcheck lint
uses: dominikh/staticcheck-action@v1
with:
version: "latest"

- name: Run revive
run: go install github.com/mgechev/revive@latest

- name: Run golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2

- name: Run misspell check spelling
run: go get -u github.com/client9/misspell/cmd/misspell

- name: Run unparam to check for unused params
run: go install mvdan.cc/unparam@latest
- name: Run Revive lint
uses: morphy2k/revive-action@v2

- name: Setup security linter
run: go install github.com/securego/gosec/v2/cmd/gosec@latest
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60

- name: Run reviewdog github-check
continue-on-error: true
Expand Down
12 changes: 12 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
run:
concurrency: 2
timeout: 3m
issues-exit-code: 1
tests: false
allow-parallel-runners: true
allow-serial-runners: true
go: '1.22.6'

linters:
enable:
- revive

0 comments on commit ff7e7f0

Please sign in to comment.