From 7190e019ae8a6715628125025906f037405f6839 Mon Sep 17 00:00:00 2001 From: Matt Mets Date: Mon, 6 Jan 2025 11:07:40 +0100 Subject: [PATCH] Move the directory list into a variable --- GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 0a85cb60b5..fb8130ea6c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1000,7 +1000,7 @@ 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 @@ -1008,7 +1008,7 @@ lint: tools ## Lint source tree # 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}'