Skip to content

Commit

Permalink
Move the directory list into a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
cibomahto committed Jan 6, 2025
1 parent d2663fd commit 7190e01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1000,15 +1000,15 @@ endif
tools:
cd internal/tools && go generate -tags tools ./

LINTFILESCMD=find src/os/ src/reflect/ -type f -name '*.go'
LINTDIRS=src/os/ src/reflect/
.PHONY: lint
lint: tools ## Lint source tree
revive -version
# TODO: lint more directories!
# revive.toml isn't flexible enough to filter out just one kind of error from a checker, so do it with grep here.
# Can't use grep with friendly formatter. Plain output isn't too bad, though.
# Use 'grep .' to get rid of stray blank line
revive -config revive.toml compiler/... $$( $(LINTFILESCMD) ) \
revive -config revive.toml compiler/... $$( find $(LINTDIRS) -type f -name '*.go' ) \
| grep -v "should have comment or be unexported" \
| grep '.' \
| awk '{print}; END {exit NR>0}'
Expand Down

0 comments on commit 7190e01

Please sign in to comment.