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

Option to configure how many lines down the @generated tag can be for format_generated_files? #5658

Closed
captbaritone opened this issue Jan 11, 2023 · 4 comments · Fixed by #5993
Labels
feature-request good first issue Issues up for grabs, also good candidates for new rustfmt contributors p-low

Comments

@captbaritone
Copy link
Contributor

captbaritone commented Jan 11, 2023

In Relay we have a large number of generated files which are required by our business to being with a specific copyright header that is slightly more than five lines. This means we can't take advantage of the format_generated_files feature.

Example file: https://github.com/facebook/relay/blob/603bb4bc2927bda8b7f0dac1d86cbc5ecbf50202/compiler/crates/relay-lsp/tests/hover_test.rs

Would it be possible to make the 5 lines limit configurable?

@ytmimi
Copy link
Contributor

ytmimi commented Jan 11, 2023

Thanks for reaching out. Seems like a reasonable enough request, and this should be a simple change.

@IVIURRAY
Copy link
Contributor

It looks like this can be closed as #5918 solves this?

@ytmimi
Copy link
Contributor

ytmimi commented Dec 28, 2023

@IVIURRAY the PR that you're referring to was closed but never merged. This issue should stay open.

@IVIURRAY
Copy link
Contributor

@ytmimi whoops, thanks! - I've opened an MR to address this #5993 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request good first issue Issues up for grabs, also good candidates for new rustfmt contributors p-low
Projects
None yet
3 participants