Skip to content

Commit 2c99692

Browse files
cibomahtodeadprogram
authored andcommitted
Move the directory list into a variable
1 parent 0ca0aad commit 2c99692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,15 +1118,15 @@ endif
11181118
tools:
11191119
cd internal/tools && go generate -tags tools ./
11201120

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

0 commit comments

Comments
 (0)