Skip to content

Commit

Permalink
Add golangci-lint to build process
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Oct 7, 2021
1 parent 626d24f commit 601c38f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ jobs:
if: matrix.integrationtest

- name: Code quality test
shell: bash
run: |
test -z "$(go fmt ./...)"
uses: golangci/golangci-lint-action@v2
with:
# Version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
if: matrix.check
24 changes: 24 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# golangci-lint configuration options

linters:
enable:
- deadcode
- errcheck
- goimports
# - revive
- ineffassign
- structcheck
- varcheck
- govet
- unconvert
disable-all: true

issues:
# Enable some lints excluded by default
exclude-use-default: false

# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-per-linter: 0

# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0

0 comments on commit 601c38f

Please sign in to comment.