Skip to content

Commit

Permalink
Use 'goimports' provided by 'golangci-lint' (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Schlicht authored and alenkacz committed Dec 13, 2019
1 parent 3556419 commit 3778b5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ run:
- pkg/client
linters-settings:
goimports:
local-prefixes: github.com/kudobuilder/kudo
# Don't use 'github.com/kudobuilder/kudo', it'll result in unreliable output!
local-prefixes: github.com/kudobuilder
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ docker-push:
.PHONY: imports
# used to update imports on project. NOT a linter.
imports:
goimports --local github.com/kudobuilder -w .
ifeq (, $(shell which golangci-lint))
./hack/install-golangcilint.sh
endif
golangci-lint run --disable-all -E goimports --fix

.PHONY: todo
# Show to-do items per file.
Expand Down

0 comments on commit 3778b5c

Please sign in to comment.