-
Notifications
You must be signed in to change notification settings - Fork 971
Open
Labels
C-feature-requestCategory: a feature request (not decided/implemented)Category: a feature request (not decided/implemented)P-lowLow priorityLow prioritycloseable???TEMPORARY: this issue or PR probably should be closed? needs team to decideTEMPORARY: this issue or PR probably should be closed? needs team to decide
Description
I was wanting to do something similar to #1695, although in my case I've got a bunch of markdown files containing Rust snippets which I'd like to format.
I knocked up a quick Python script which almost does this (gist).
However it looks like rustfmt will skip any file not ending in *.rs... Would it be possible to allow non-Rust files if they are explicitly specified using the --file-lines argument?
Output of running rustfmt from Python:
python rustfmt.py
b"Warning: Extra file listed in file_lines option '/home/michael/Documents/playground/static-analyser-in-rust/src/codemap.md'\nWarning: Extra file listed in file_lines option '/home/michael/Documents/playground/static-analyser-in-rust/src/lib.md'\nWarning: Extra file listed in file_lines option '/home/michael/Documents/playground/static-analyser-in-rust/src/parse.md'\nWarning: Extra file listed in file_lines option '/home/michael/Documents/playground/static-analyser-in-rust/src/lowering.md'\nWarning: Extra file listed in file_lines option '/home/michael/Documents/playground/static-analyser-in-rust/src/analysis.md'\nWarning: Extra file listed in file_lines option '/home/michael/Documents/playground/static-analyser-in-rust/src/errors.md'\nWarning: Extra file listed in file_lines option '/home/michael/Documents/playground/static-analyser-in-rust/src/lex.md'\n\n"
b''
euclio, sergeysova, hsribei, shepmaster, lambda-fairy and 3 more
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: a feature request (not decided/implemented)Category: a feature request (not decided/implemented)P-lowLow priorityLow prioritycloseable???TEMPORARY: this issue or PR probably should be closed? needs team to decideTEMPORARY: this issue or PR probably should be closed? needs team to decide