Skip to content

Commit 7190e01

Browse files
committed
Move the directory list into a variable
1 parent d2663fd commit 7190e01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GNUmakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1000,15 +1000,15 @@ endif
10001000
tools:
10011001
cd internal/tools && go generate -tags tools ./
10021002

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

0 commit comments

Comments
 (0)