mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
feat(test): use a metalinter to find more Go code issues on CI
This commit is contained in:
19
.golangci.yml
Normal file
19
.golangci.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
run:
|
||||
deadline: 5m
|
||||
skip-files:
|
||||
- bindata_assetfs.go
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- golint
|
||||
- dupl
|
||||
- goconst
|
||||
- gocyclo
|
||||
|
||||
linters-settings:
|
||||
govet:
|
||||
check-shadowing: true
|
||||
golint:
|
||||
min-confidence: 0
|
||||
dupl:
|
||||
threshold: 200
|
||||
@@ -39,6 +39,8 @@ jobs:
|
||||
|
||||
- stage: Lint Go code
|
||||
<<: *DEFAULTS_GO
|
||||
before_script:
|
||||
- make mock-assets
|
||||
script: make lint-go
|
||||
|
||||
- stage: Lint JavaScript code
|
||||
|
||||
4
Makefile
4
Makefile
@@ -31,7 +31,7 @@ endif
|
||||
|
||||
.build/deps-lint-go.ok:
|
||||
@mkdir -p .build
|
||||
go get -u github.com/golang/lint/golint
|
||||
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
touch $@
|
||||
|
||||
.build/deps-build-node.ok: ui/package.json ui/package-lock.json
|
||||
@@ -103,7 +103,7 @@ run-docker: docker-image
|
||||
|
||||
.PHONY: lint-go
|
||||
lint-go: .build/deps-lint-go.ok
|
||||
golint ./... | (egrep -v "^vendor/|^bindata_assetfs.go" || true)
|
||||
golangci-lint run
|
||||
|
||||
.PHONY: lint-js
|
||||
lint-js: .build/deps-build-node.ok
|
||||
|
||||
Reference in New Issue
Block a user