Skip to content

Commit

Permalink
build: add a lint step in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Dec 27, 2018
1 parent 88a632c commit b8de45b
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Expand Up @@ -9,4 +9,7 @@ jobs:
steps:
- checkout
- run: go get -v -t -d ./...
- run: go test -v ./...
- run: make install
- run: make test
- run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.12.2
- run: make lint
34 changes: 34 additions & 0 deletions .golangci.yml
@@ -0,0 +1,34 @@
run:
deadline: 1m
tests: false
#skip-files:
# - ".*\\.gen\\.go"

linters-settings:
golint:
min-confidence: 0
maligned:
suggest-new: true
goconst:
min-len: 5
min-occurrences: 4
misspell:
locale: US

linters:
disable-all: true
enable:
- goconst
- misspell
- deadcode
- misspell
- structcheck
- errcheck
- unused
- varcheck
- staticcheck
- unconvert
- gofmt
- goimports
- golint
- ineffassign
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -6,6 +6,10 @@ install:
test:
go test -v ./...

.PHONY: lint
lint:
golangci-lint run --verbose ./...

.PHONY: update_examples
update_examples:
for dir in $(sort $(dir $(wildcard examples/*/*))); do (cd $$dir && make); done
Expand Down
2 changes: 1 addition & 1 deletion pkg/airtabledb/airtabledb.go
@@ -1,4 +1,4 @@
package airtabledb
package airtabledb // import "moul.io/depviz/pkg/airtabledb"

import (
"encoding/json"
Expand Down
1 change: 1 addition & 0 deletions pkg/issues/doc.go
@@ -0,0 +1 @@
package issues // import "moul.io/depviz/pkg/issues"

0 comments on commit b8de45b

Please sign in to comment.