Skip to content

Commit 2db1103

Browse files
committed
Define a minimum set of exclude flags
1 parent d16c973 commit 2db1103

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

tools/make/lib/ls/Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,18 @@ PACKAGES_PATTERN ?= package.json
222222
PACKAGES_FILTER ?= .*/.*
223223

224224

225-
# Common exclude flags (Note: order does matter to some degree):
225+
# Minimum set of exclude flags (Note: order does matter to some degree):
226+
FIND_EXCLUDE_FLAGS ?= \
227+
-not -path "$(ROOT_DIR)/.git/*" \
228+
-not -path "$(NODE_MODULES)/*" \
229+
-not -path "$(DOCS_DIR)/**/$(NODE_MODULES_FOLDER)/*" \
230+
-not -path "$(BUILD_DIR)/*" \
231+
-not -path "$(REPORTS_DIR)/*" \
232+
-not -path "$(TMP_DIR)/*" \
233+
-not -path "$(ROOT_DIR)/**/$(BUILD_FOLDER)/*" \
234+
-not -path "$(ROOT_DIR)/**/$(TMP_FOLDER)/*"
235+
236+
# Common exclude flags that most recipes should use (Note: order does matter to some degree):
226237
FIND_COMMON_EXCLUDE_FLAGS ?= \
227238
-not -path "$(ROOT_DIR)/.*" \
228239
-not -path "$(NODE_MODULES)/*" \
@@ -253,15 +264,7 @@ FIND_EXAMPLES_EXCLUDE_FLAGS ?= \
253264
FIND_FILES_EXCLUDE_FLAGS ?= $(FIND_COMMON_EXCLUDE_FLAGS)
254265

255266
# Markdown exclude flags:
256-
FIND_MARKDOWN_EXCLUDE_FLAGS ?= \
257-
-not -path "$(ROOT_DIR)/.git/*" \
258-
-not -path "$(NODE_MODULES)/*" \
259-
-not -path "$(DOCS_DIR)/**/$(NODE_MODULES_FOLDER)/*" \
260-
-not -path "$(BUILD_DIR)/*" \
261-
-not -path "$(TMP_DIR)/*" \
262-
-not -path "$(REPORTS_DIR)/*" \
263-
-not -path "$(ROOT_DIR)/**/$(BUILD_FOLDER)/*" \
264-
-not -path "$(ROOT_DIR)/**/$(TMP_FOLDER)/*"
267+
FIND_MARKDOWN_EXCLUDE_FLAGS ?= $(FIND_EXCLUDE_FLAGS)
265268

266269
# Packages exclude flags:
267270
FIND_PACKAGES_EXCLUDE_FLAGS ?= \

tools/make/lib/ls/files.mk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@ FIND_FILES_FLAGS ?= \
2323
-type f \
2424
-name "$(FILES_PATTERN)" \
2525
-regex "$(FILES_FILTER)" \
26-
-not -path "$(ROOT_DIR)/.*" \
27-
-not -path "$(NODE_MODULES)/*" \
28-
-not -path "$(DOCS_DIR)/**/$(NODE_MODULES_FOLDER)/*" \
29-
-not -path "$(BUILD_DIR)/*" \
30-
-not -path "$(REPORTS_DIR)/*" \
31-
-not -path "$(ROOT_DIR)/**/$(BUILD_FOLDER)/*"
26+
$(FIND_EXCLUDE_FLAGS)
3227

3328
ifneq ($(OS), Darwin)
3429
FIND_FILES_FLAGS := -regextype posix-extended $(FIND_FILES_FLAGS)

0 commit comments

Comments
 (0)