Skip to content

Fluent tidy improvements - #147396

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:fluent-tidy-improvements
Oct 7, 2025
Merged

Fluent tidy improvements#147396
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:fluent-tidy-improvements

Conversation

@GuillaumeGomez

@GuillaumeGomezGuillaumeGomez commented Oct 6, 2025

Copy link
Copy Markdown
Member

Follow-up of #147345 and of #147191.

It uses fluent_syntax to parse fluent files (but not for blessing, not even sure how the current one works).

I also added an assert to ensure we never go to previous situation where the fluent files were actually not checked at all.

cc @Kivooeo
r? kobzol

@rustbotrustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 6, 2025
@Kivooeo

Copy link
Copy Markdown
Member

Looks great, nice that we can use builtin things to parse it

Have you test it locally?

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

A bit, it detects what it's supposed to.

@KobzolKobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks! Do you think we could also use the parser for sorting the records?

View changes since this review

Comment threadsrc/tools/tidy/src/fluent_alphabetical.rs Outdated
Comment threadsrc/tools/tidy/src/fluent_alphabetical.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

This is great, thanks! Do you think we could also use the parser for sorting the records?

It's the part I'm unclear about. The current seems to only move the line where the message is defined, but I don't know if it moves its content too. And what happens about comments, etc etc.

I can look into it in a follow-up if you want?

@Kobzol

Copy link
Copy Markdown
Member

Sure, it seems more complicated.

@GuillaumeGomez
GuillaumeGomezforce-pushed the fluent-tidy-improvements branch from 8a4e7df to 831cdf3CompareOctober 6, 2025 11:48
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Applied suggestions.

@Kobzol

Copy link
Copy Markdown
Member

Looks good, thanks!

@bors r+ rollup

@bors

bors commented Oct 6, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 831cdf3 has been approved by Kobzol

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 6, 2025
@GuillaumeGomez
GuillaumeGomezforce-pushed the fluent-tidy-improvements branch from 831cdf3 to d53eb91CompareOctober 6, 2025 13:21
@rustbotrustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Oct 6, 2025
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomezforce-pushed the fluent-tidy-improvements branch from d53eb91 to 831cdf3CompareOctober 6, 2025 13:23
@rustbot

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Sorry, pushed another code to this branch. Fixed it.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

@bors r=kobzol rollup

@bors

bors commented Oct 6, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 831cdf3 has been approved by kobzol

It is now in the queue for this repository.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 7, 2025
…ments, r=kobzol
Fluent tidy improvements
Follow-up of rust-lang#147345 and of rust-lang#147191.
It uses `fluent_syntax` to parse `fluent` files (but not for blessing, not even sure how the current one works).
I also added an `assert` to ensure we never go to previous situation where the `fluent` files were actually not checked at all.
cc `@Kivooeo`
r? kobzol
This was referenced Oct 7, 2025
bors added a commit that referenced this pull request Oct 7, 2025
Rollup of 7 pull requests
Successful merges:
- #145495 (Use declarative macro for `#[derive(TryFromU32)]`)
- #147165 (test: Subtract code_offset from width for ui_testing)
- #147354 (Fix wrong span for hightlight for duplicated diff lines)
- #147395 (Improve diagnostics: update note and add help message)
- #147396 (Fluent tidy improvements)
- #147407 (Update books)
- #147413 (don't panic on extern with just multiple quotes in the name)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 1afc08d into rust-lang:masterOct 7, 2025
20 checks passed
@rustbotrustbot added this to the 1.92.0 milestone Oct 7, 2025
rust-timer added a commit that referenced this pull request Oct 7, 2025
Rollup merge of #147396 - GuillaumeGomez:fluent-tidy-improvements, r=kobzol
Fluent tidy improvements
Follow-up of #147345 and of #147191.
It uses `fluent_syntax` to parse `fluent` files (but not for blessing, not even sure how the current one works).
I also added an `assert` to ensure we never go to previous situation where the `fluent` files were actually not checked at all.
cc ``@Kivooeo``
r? kobzol
@GuillaumeGomez
GuillaumeGomez deleted the fluent-tidy-improvements branch October 7, 2025 11:51
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Oct 8, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#145495 (Use declarative macro for `#[derive(TryFromU32)]`)
- rust-lang/rust#147165 (test: Subtract code_offset from width for ui_testing)
- rust-lang/rust#147354 (Fix wrong span for hightlight for duplicated diff lines)
- rust-lang/rust#147395 (Improve diagnostics: update note and add help message)
- rust-lang/rust#147396 (Fluent tidy improvements)
- rust-lang/rust#147407 (Update books)
- rust-lang/rust#147413 (don't panic on extern with just multiple quotes in the name)
r? `@ghost`
`@rustbot` modify labels: rollup
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Oct 18, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#145495 (Use declarative macro for `#[derive(TryFromU32)]`)
- rust-lang/rust#147165 (test: Subtract code_offset from width for ui_testing)
- rust-lang/rust#147354 (Fix wrong span for hightlight for duplicated diff lines)
- rust-lang/rust#147395 (Improve diagnostics: update note and add help message)
- rust-lang/rust#147396 (Fluent tidy improvements)
- rust-lang/rust#147407 (Update books)
- rust-lang/rust#147413 (don't panic on extern with just multiple quotes in the name)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-makeArea: port run-make Makefiles to rmake.rsA-tidyArea: The tidy toolS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@GuillaumeGomez@Kivooeo@Kobzol@bors@rustbot