Skip to content

Commit

Permalink
chore: pass argument to linter script (#15592)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Mar 29, 2023
1 parent 9a07b7d commit cb30586
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,14 @@ golangci_version=v1.51.2
lint:
@echo "--> Running linter"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@sh ./scripts/go-lint-all.sh
@sh ./scripts/go-lint-all.sh --timeout=15m

.PHONY: lint
lint-fix:
@echo "--> Running linter"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@sh ./scripts/go-lint-all.sh --fix

.PHONY: lint lint-fix

###############################################################################
### Protobuf ###
Expand Down
2 changes: 1 addition & 1 deletion scripts/go-lint-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export pwd=$(pwd)
for modfile in $(find . -name go.mod); do
echo "linting $(dirname $modfile)"
DIR=$(dirname $modfile)
(cd $DIR; golangci-lint run ./... --fix -c $pwd/.golangci.yml)
(cd $DIR; golangci-lint run ./... -c $pwd/.golangci.yml $@)
done

0 comments on commit cb30586

Please sign in to comment.