diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a0218bf3..5c1b7bf10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 000000000..a477186d1 --- /dev/null +++ b/.golangci.yml @@ -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