rustfmt
rustfmt copied to clipboard
Filter out block comment in filter_normal_code if configured to use rustfmt 2 (#4668)
Back-port the fix (#4720) to rustfmt 1.x;
In order to version-gate in LineClasses, several function signature had been changed:
wrap_strfilter_normal_code
Should we add the idempotent test cases as well?
itemize_list
Yes please!
I didn't see version gating in other idempotent tests, so I am thinking about creating a standalone set of test cases that use a Config file whose version is Version:Two. Please let me know if you recommend doing this the other way.
I didn't see version gating in other idempotent tests, so I am thinking about creating a standalone set of test cases that use a Config file whose version is Version:Two
There's actually a much simpler to specify configuration values in the files used for the system+idempotence tests, just add comments to the top of the files as needed of the form // rustfmt-{option name}: {value}
e.g. https://github.com/rust-lang/rustfmt/blob/c3a51111061e65a08ebce05c42e0d89ee1fae83a/tests/source/issue-3302.rs#L1
More info can be found in this section of the Contributing guide.
Thank you! This looks good to go, though I haven't decided whether I want to pull it into the 1.4.37 release just yet so may hold off on merging for a little while.
There are plenty of other cases where we need to do a similar backporting, as well as general issues/feature requests on the backlog, so if you're interested in working on anything else please let me know and/or drop a note on the corresponding issue!
@ChinYing-Li maybe you could push the branch again to re-trigger the CI so it might become green?
Other than that, since 1.4.37 has been released a while ago... :)