Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out block comment in filter_normal_code if configured to use rustfmt 2 (#4668) #4758

Open
wants to merge 2 commits into
base: rustfmt-1.4.37
Choose a base branch
from

Conversation

ChinYing-Li
Copy link
Contributor

Back-port the fix (#4720) to rustfmt 1.x;
In order to version-gate in LineClasses, several function signature had been changed:

  • wrap_str
  • filter_normal_code

Should we add the idempotent test cases as well?

@calebcartwright
Copy link
Member

itemize_list

Yes please!

@ChinYing-Li
Copy link
Contributor Author

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.

@calebcartwright
Copy link
Member

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.

// rustfmt-version: Two

More info can be found in this section of the Contributing guide.

@calebcartwright
Copy link
Member

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!

@karyon
Copy link
Contributor

karyon commented Oct 22, 2021

@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... :)

gentoid added a commit to gentoid/rustfmt that referenced this pull request Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants