diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd6d9550f06433ac1113dd77eba613603db503d7..e59ccb7072824ca7cab69df44280c7ef4ae52a28 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,7 +100,7 @@ lint: # Write the code coverage report to gl-code-quality-report.json # and print linting issues to stdout in the format: path/to/file:line description # add `--issues-exit-code 0` to ignore linting issues - - golangci-lint run --print-issued-lines=false --out-format code-climate:gl-code-quality-report.json,line-number + - golangci-lint run --output.text.print-issued-lines=false --output.code-climate.path=gl-code-quality-report.json artifacts: reports: codequality: gl-code-quality-report.json diff --git a/.golangci.yml b/.golangci.yml index 9edb9994cfaa8701e119de8e1535f26ec112ed17..8b3558e51c57661ef3fe176e230038282dbfdd5c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,16 +1,32 @@ +version: "2" run: - timeout: 5m - modules-download-mode: readonly - + modules-download-mode: readonly linters: - disable-all: true - enable: - - errcheck - - gofumpt - - goimports - - gosimple - - govet - - ineffassign - - staticcheck - - typecheck - - unused + default: none + enable: + - errcheck + - govet + - ineffassign + - staticcheck + - unused + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofumpt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$