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

@GuillaumeGomez GuillaumeGomez 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

@rustbot rustbot 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

Kivooeo commented Oct 6, 2025

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
Member Author

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

@Kobzol Kobzol 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 thread src/tools/tidy/src/fluent_alphabetical.rs Outdated
Comment thread src/tools/tidy/src/fluent_alphabetical.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

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

Kobzol commented Oct 6, 2025

Copy link
Copy Markdown
Member

Sure, it seems more complicated.

@GuillaumeGomez GuillaumeGomez force-pushed the fluent-tidy-improvements branch from 8a4e7df to 831cdf3 Compare October 6, 2025 11:48
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Applied suggestions.

@Kobzol

Kobzol commented Oct 6, 2025

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.

@bors bors 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 GuillaumeGomez force-pushed the fluent-tidy-improvements branch from 831cdf3 to d53eb91 Compare October 6, 2025 13:21
@rustbot rustbot 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 GuillaumeGomez force-pushed the fluent-tidy-improvements branch from d53eb91 to 831cdf3 Compare October 6, 2025 13:23
@rustbot

rustbot commented Oct 6, 2025

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
Member Author

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

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@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
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:master Oct 7, 2025
20 checks passed
@rustbot rustbot 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-actions Bot 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs A-tidy Area: The tidy tool S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant 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