mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Add support for marking files no-reformat.
This commit is contained in:
parent
050f62983d
commit
eb9969f546
9
mk/pp.mk
9
mk/pp.mk
@ -4,9 +4,14 @@ PP_INPUTS := $(wildcard $(addprefix $(S)src/lib/,*.rs */*.rs)) \
|
|||||||
$(wildcard $(S)src/test/*/*.rs \
|
$(wildcard $(S)src/test/*/*.rs \
|
||||||
$(S)src/test/*/*/*.rs)
|
$(S)src/test/*/*/*.rs)
|
||||||
|
|
||||||
|
PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L no-reformat)
|
||||||
|
|
||||||
reformat: $(SREQ1)
|
reformat: $(SREQ1)
|
||||||
@$(call E, reformat [stage1]: $@)
|
@$(call E, reformat [stage1]: $@)
|
||||||
for i in $(PP_INPUTS); \
|
for i in $(PP_INPUTS_FILTERED); \
|
||||||
do $(call CFG_RUN_TARG,stage1, stage1/rustc$(X)) \
|
do $(call CFG_RUN_TARG,stage1, stage1/rustc$(X)) \
|
||||||
--pretty normal $$i >$$i.tmp && mv $$i.tmp $$i; \
|
--pretty normal $$i >$$i.tmp; \
|
||||||
|
if cmp --silent $$i.tmp $$i; \
|
||||||
|
then echo no changes to $$i; rm $$i.tmp; \
|
||||||
|
else mv $$i.tmp $$i; fi \
|
||||||
done
|
done
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// no-reformat
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* When you write a block-expression thing followed by
|
* When you write a block-expression thing followed by
|
||||||
|
Loading…
Reference in New Issue
Block a user