mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-19 06:21:41 -04:00
golangci-lint: Update --new-from-rev option to check only newly added commits (#8923)
* golangci-lint: Update --new-from-rev option to check only code added in the latest commit Co-authored-by: Adrien Delorme <[email protected]>
This commit is contained in:
co-authored by
Adrien Delorme
parent
97d797d2f4
commit
3a9d356c9d
@@ -82,7 +82,7 @@ lint: install-lint-deps ## Lint Go code
|
||||
|
||||
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=`git merge-base master HEAD` ./...
|
||||
|
||||
|
||||
fmt: ## Format Go code
|
||||
|
||||
Reference in New Issue
Block a user