Loading .gitlab/ci/test.yml +2 −1 Original line number Diff line number Diff line Loading @@ -22,9 +22,10 @@ test-race: lint: extends: .go-cache image: registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine image: golangci/golangci-lint:v1.64.8 stage: test script: - apt-get update && apt-get install --yes --no-install-recommends jq # Use default .golangci.yml file from the image if one is not present in the project root. - "[ -e .golangci.yml ] || cp /golangci/.golangci.yml ." # Write the code coverage report to gl-code-quality-report.json Loading .golangci.yml +12 −27 Original line number Diff line number Diff line Loading @@ -21,23 +21,12 @@ run: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ modules-download-mode: readonly skip-dirs: - vendor$ - .git& - build$ - bin$ - internal/testdata$ # which files to skip: they will be analyzed, but issues from them # won't be reported. Default value is empty list, but there is # no need to include all autogenerated files, we confidently recognize # autogenerated files. If it's not please let us know. skip-files: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" format: colored-line-number formats: - format: colored-line-number path: stdout # print lines of code with issue, default is true print-issued-lines: true Loading @@ -56,10 +45,6 @@ linters-settings: # default is false: such cases aren't reported by default. check-blank: false govet: # report about shadowed variables # Note by Seb: This produces too many false positives setting this to false check-shadowing: false # Obtain type information from installed (to $GOPATH/pkg) package files: # golangci-lint will execute `go install -i` and `go test -i` for analyzed packages # before analyzing them. Loading @@ -84,9 +69,6 @@ linters-settings: gocyclo: # minimal code complexity to report, 30 by default (but we recommend 10-20) min-complexity: 10 maligned: # print struct with more effective memory layout or not, false by default suggest-new: true dupl: # tokens count to trigger issue, 150 by default threshold: 100 Loading Loading @@ -158,30 +140,27 @@ wsl: linters: enable: - gosec - megacheck - govet - deadcode - gocyclo - gofmt - goimports - gosimple - revive - ineffassign - misspell - nakedret - unconvert - unparam - unused - errcheck - structcheck - varcheck - dogsled - staticcheck - whitespace - wsl enable-all: false disable: - maligned - prealloc - scopelint disable-all: false presets: - bugs Loading @@ -198,6 +177,12 @@ issues: - should have a package comment - Using the variable on range scope `tt` in function literal exclude-dirs: - vendor$ - .git& - build$ - bin$ - internal/testdata$ # Independently from option `exclude` we use default exclude patterns, # it can be disabled by this option. To list all Loading Makefile.util.mk +2 −2 Original line number Diff line number Diff line GOLANGCI_LINT_IMAGE := registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine GOLANGCI_LINT_IMAGE := golangci/golangci-lint:v1.64.8 .PHONY: lint test cover list deps-check mocks _test test-all test-integration test-integration-race test-race lint: docker run -v $(PWD):/app -w /app $(GOLANGCI_LINT_IMAGE) \ sh -c "golangci-lint run --out-format code-climate $(if $V,-v) \ sh -c "apt-get update && apt-get install --yes --no-install-recommends jq && golangci-lint run --out-format code-climate $(if $V,-v) \ | tee gl-code-quality-report.json \ | jq -r '.[] | \"\(.location.path):\(.location.lines.begin) \(.description)\"'" Loading Loading
.gitlab/ci/test.yml +2 −1 Original line number Diff line number Diff line Loading @@ -22,9 +22,10 @@ test-race: lint: extends: .go-cache image: registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine image: golangci/golangci-lint:v1.64.8 stage: test script: - apt-get update && apt-get install --yes --no-install-recommends jq # Use default .golangci.yml file from the image if one is not present in the project root. - "[ -e .golangci.yml ] || cp /golangci/.golangci.yml ." # Write the code coverage report to gl-code-quality-report.json Loading
.golangci.yml +12 −27 Original line number Diff line number Diff line Loading @@ -21,23 +21,12 @@ run: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ modules-download-mode: readonly skip-dirs: - vendor$ - .git& - build$ - bin$ - internal/testdata$ # which files to skip: they will be analyzed, but issues from them # won't be reported. Default value is empty list, but there is # no need to include all autogenerated files, we confidently recognize # autogenerated files. If it's not please let us know. skip-files: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" format: colored-line-number formats: - format: colored-line-number path: stdout # print lines of code with issue, default is true print-issued-lines: true Loading @@ -56,10 +45,6 @@ linters-settings: # default is false: such cases aren't reported by default. check-blank: false govet: # report about shadowed variables # Note by Seb: This produces too many false positives setting this to false check-shadowing: false # Obtain type information from installed (to $GOPATH/pkg) package files: # golangci-lint will execute `go install -i` and `go test -i` for analyzed packages # before analyzing them. Loading @@ -84,9 +69,6 @@ linters-settings: gocyclo: # minimal code complexity to report, 30 by default (but we recommend 10-20) min-complexity: 10 maligned: # print struct with more effective memory layout or not, false by default suggest-new: true dupl: # tokens count to trigger issue, 150 by default threshold: 100 Loading Loading @@ -158,30 +140,27 @@ wsl: linters: enable: - gosec - megacheck - govet - deadcode - gocyclo - gofmt - goimports - gosimple - revive - ineffassign - misspell - nakedret - unconvert - unparam - unused - errcheck - structcheck - varcheck - dogsled - staticcheck - whitespace - wsl enable-all: false disable: - maligned - prealloc - scopelint disable-all: false presets: - bugs Loading @@ -198,6 +177,12 @@ issues: - should have a package comment - Using the variable on range scope `tt` in function literal exclude-dirs: - vendor$ - .git& - build$ - bin$ - internal/testdata$ # Independently from option `exclude` we use default exclude patterns, # it can be disabled by this option. To list all Loading
Makefile.util.mk +2 −2 Original line number Diff line number Diff line GOLANGCI_LINT_IMAGE := registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine GOLANGCI_LINT_IMAGE := golangci/golangci-lint:v1.64.8 .PHONY: lint test cover list deps-check mocks _test test-all test-integration test-integration-race test-race lint: docker run -v $(PWD):/app -w /app $(GOLANGCI_LINT_IMAGE) \ sh -c "golangci-lint run --out-format code-climate $(if $V,-v) \ sh -c "apt-get update && apt-get install --yes --no-install-recommends jq && golangci-lint run --out-format code-climate $(if $V,-v) \ | tee gl-code-quality-report.json \ | jq -r '.[] | \"\(.location.path):\(.location.lines.begin) \(.description)\"'" Loading