Skip to content

Commit

Permalink
enable lint on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Minter committed Nov 19, 2020
1 parent c7ff08b commit ac6068a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
28 changes: 4 additions & 24 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
run:
timeout: "5m"

linters:
disable-all: true
enable: [
"govet",
"goimports",
"gofmt",
"staticcheck",
]

linters-settings:

goimports:
local-prefixes: "github.com/Azure/ARO-RP"

govet:
check-shadowing: false
timeout: 5m

issues:
max-issues-per-linter: 0
max-same-issues: 0

exclude-rules:
- linters: [ "staticcheck" ]
path: _test\.go
text: "Dial is deprecated: Use DialContext instead"
- linters:
- staticcheck
text: "SA1019: codec.BasicHandle is deprecated"
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ test-go: generate
go vet ./...
set -o pipefail && go test -v ./... -coverprofile cover.out | tee uts.txt

lint-go: generate
golangci-lint run
lint-go:
go run ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint run

test-python: generate pyenv az
. pyenv/bin/activate && \
Expand All @@ -119,4 +119,4 @@ vendor:
# https://groups.google.com/forum/#!topic/golang-nuts/51-D_YFC78k
hack/update-go-module-dependencies.sh

.PHONY: admin.kubeconfig aro az clean client generate image-aro image-fluentbit image-proxy image-routefix proxy publish-image-aro publish-image-fluentbit publish-image-proxy publish-image-routefix secrets secrets-update e2e.test test-e2e test-go test-python vendor
.PHONY: admin.kubeconfig aro az clean client generate image-aro image-fluentbit image-proxy image-routefix lint-go proxy publish-image-aro publish-image-fluentbit publish-image-proxy publish-image-routefix secrets secrets-update e2e.test test-e2e test-go test-python vendor

0 comments on commit ac6068a

Please sign in to comment.