mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +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 \
|
||||
$(S)src/test/*/*/*.rs)
|
||||
|
||||
PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L no-reformat)
|
||||
|
||||
reformat: $(SREQ1)
|
||||
@$(call E, reformat [stage1]: $@)
|
||||
for i in $(PP_INPUTS); \
|
||||
for i in $(PP_INPUTS_FILTERED); \
|
||||
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
|
||||
|
@ -1,3 +1,5 @@
|
||||
// no-reformat
|
||||
|
||||
/*
|
||||
*
|
||||
* When you write a block-expression thing followed by
|
||||
|
Loading…
Reference in New Issue
Block a user