makefile: Update code path for golangci-lint (#8751)

While `golangci-lint run` is the same as `golangci-lint run ./...` running it without a
path seems to throw warning messages related to its cache, which is confusing.
This change sets an explicit path for golangci-lint when calling `make lint` or `make ci-lint`.
This commit is contained in:
Wilken Rivera 2020-02-17 05:24:08 -05:00 committed by GitHub
parent 9a85fdd0a5
commit 5a87760702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -76,13 +76,13 @@ lint: install-lint-deps ## Lint Go code
echo "golangci-lint run ./$(PKG_NAME)/..."; \
golangci-lint run ./$(PKG_NAME)/...; \
else \
echo "golangci-lint run"; \
golangci-lint run; \
echo "golangci-lint run ./..."; \
golangci-lint run ./...; \
fi
ci-lint: install-lint-deps ## On ci only lint newly added Go source files
@echo "==> Running linter on newly added Go source files..."
GO111MODULE=on golangci-lint run --new-from-rev=origin/master
GO111MODULE=on golangci-lint run --new-from-rev=origin/master ./...
fmt: ## Format Go code