Skip to content

Commit 1adc084

Browse files
committed
mk: Split tidy into multiple tidy rules
* tidy - runs all tidy scripts * tidy-basic - tidy.rs * tidy-binaries - check-binaries.py * tidy-errors - errorck.py * tidy-features - featureck.py
1 parent 63fcbcf commit 1adc084

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

mk/tests.mk

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,13 @@ ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
260260
,$(ALL_HS))
261261

262262
# Run the tidy script in multiple parts to avoid huge 'echo' commands
263-
tidy:
263+
.PHONY: tidy
264+
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
265+
266+
endif
267+
268+
.PHONY: tidy-basic
269+
tidy-basic:
264270
@$(call E, check: formatting)
265271
$(Q)find $(S)src -name '*.r[sc]' \
266272
-and -not -regex '^$(S)src/jemalloc.*' \
@@ -286,6 +292,10 @@ tidy:
286292
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
287293
$(Q)echo $(ALL_HS) \
288294
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
295+
296+
.PHONY: tidy-binaries
297+
tidy-binaries:
298+
@$(call E, check: binaries)
289299
$(Q)find $(S)src -type f -perm +a+x \
290300
-not -name '*.rs' -and -not -name '*.py' \
291301
-and -not -name '*.sh' \
@@ -300,11 +310,16 @@ tidy:
300310
| grep '^$(S)src/libbacktrace' -v \
301311
| grep '^$(S)src/rust-installer' -v \
302312
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
303-
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
304-
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
305313

314+
.PHONY: tidy-errors
315+
tidy-errors:
316+
@$(call E, check: extended errors)
317+
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
306318

307-
endif
319+
.PHONY: tidy-features
320+
tidy-features:
321+
@$(call E, check: feature sanity)
322+
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
308323

309324

310325
######################################################################

0 commit comments

Comments
 (0)