Skip to content

Commit

Permalink
Add golangci-lint configuration file and instructions to run it.
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Jun 18, 2020
1 parent f1022dd commit ee9d844
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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

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

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

lint-go: generate
golangci-lint run

test-python: generate pyenv${PYTHON_VERSION}
. pyenv${PYTHON_VERSION}/bin/activate && \
$(MAKE) az && \
Expand Down

0 comments on commit ee9d844

Please sign in to comment.