-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
tidy: check fluent files for style #100671
Conversation
r? @jyn514 (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks for the patch!
r? @davidtwco |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Will r=me once CI passes.
cc @Mark-Simulacrum for the tidy change |
@bors r+ rollup |
I'm not sure this PR is a good idea, at least for non-english fluent files, because those will be edited using a tool (at least according to what @Manishearth said), and that tool might not create ftl files that conform with tidy checks. Even with the submodules/subtrees that rustc uses, a lot of them are exempt from tidy, see the |
English Fluent will be maintained manually like it is now. We can add whatever exceptions we need for submodules or translations or however we end up handling that, so I think this should be okay. |
…twco tidy: check fluent files for style Inspired by rust-lang#100651 (comment) There were a lot of line length violations, so I've excepted that lint - I'm not sure if fluent files can be formatted to avoid long lines at all.
@bors r- files are actually causing errors |
My plan is to wait until #100651 lands, then rebase this (fixing the new formatting problems) and hope it doesn't race another PR that adds whitespace problems. Sound sensible? |
fd05fa0
to
2954571
Compare
|
@rustbot ready |
I'll approve this but not for inclusion in rollups just in case it gets mixed in with the other translation PRs that are happening and makes things fail. @bors r+ rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d0ea1d7): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
… r=davidtwco fluent: mandate slug names to be prefixed by crate name This is currently only convention, but not actively checked for. Additionally, improve error messages to highlight the path of the offending fluent file rather than the identifier preceding it. This will conflict with rust-lang#100671, so I'll leave it as draft until that's merged.
Inspired by #100651 (comment)
There were a lot of line length violations, so I've excepted that lint - I'm not sure if fluent files can be formatted to avoid long lines at all.