mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
Remove -f option from rustfmt. (#356)
And add support for RUSTFMT_FLAGS (Some people might need -f option)
This commit is contained in:
parent
4f626098ec
commit
791357115c
1 changed files with 7 additions and 1 deletions
|
@ -19,4 +19,10 @@ for fn in ["BUILD.gn", ".gn"] + glob("build_extra/**/*.gn*"):
|
||||||
run(["yapf", "-i"] + glob("tools/*.py"))
|
run(["yapf", "-i"] + glob("tools/*.py"))
|
||||||
run(["node", prettier, "--write"] + glob("js/*.js") + glob("js/*.ts") +
|
run(["node", prettier, "--write"] + glob("js/*.js") + glob("js/*.ts") +
|
||||||
["tsconfig.json"] + ["tslint.json"])
|
["tsconfig.json"] + ["tslint.json"])
|
||||||
run(["rustfmt", "-f", "--write-mode", "overwrite"] + glob("src/*.rs"))
|
|
||||||
|
# Set RUSTFMT_FLAGS for extra flags.
|
||||||
|
rustfmt_extra_args = []
|
||||||
|
if 'RUSTFMT_FLAGS' in os.environ:
|
||||||
|
rustfmt_extra_args += os.environ['RUSTFMT_FLAGS'].split()
|
||||||
|
run(["rustfmt", "--write-mode", "overwrite"] + rustfmt_extra_args +
|
||||||
|
glob("src/*.rs"))
|
||||||
|
|
Loading…
Reference in a new issue