Skip to content

feat(lints): Add deny-by-default text_direction_codepoint lints#16950

Merged
weihanglo merged 3 commits intorust-lang:masterfrom
epage:textdir
May 1, 2026
Merged

feat(lints): Add deny-by-default text_direction_codepoint lints#16950
weihanglo merged 3 commits intorust-lang:masterfrom
epage:textdir

Conversation

@epage
Copy link
Copy Markdown
Contributor

@epage epage commented Apr 30, 2026

What does this PR try to resolve?

These are meant to mirror

Note: on publish we strip comments but the codepoints will still be unescaped in literals. I considered escaping by default in toml but there can be legitimate reasons to use these code points unescaped, hence why there are two lints.

Fixes #16374
Fixes #16373

Closes #16452

How to test and review this PR?

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-workspaces Area: workspaces S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 30, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 30, 2026

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, weihanglo

Copy link
Copy Markdown
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

docs: Some(
r#"
### What it does
Detects Unicode codepoints in comments that change the visual representation of text on screen
Copy link
Copy Markdown
Member

@weihanglo weihanglo May 1, 2026

Choose a reason for hiding this comment

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

It detect manifests only. Should we say it explicitly as we also own Cargo configuration and other files?

I know we didn't do this for other lints though their contexts are more specific.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to mention it.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 1, 2026

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.

Copy link
Copy Markdown
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

@weihanglo weihanglo enabled auto-merge May 1, 2026 21:40
@weihanglo weihanglo added this pull request to the merge queue May 1, 2026
Merged via the queue into rust-lang:master with commit 6fba4bb May 1, 2026
31 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2026
@epage epage deleted the textdir branch May 1, 2026 23:19
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request May 2, 2026
Update cargo submodule

10 commits in eb9b60f1f6604b5e022c56be31692c215b8ba11d..4f9b52075316e9ced380c8fa492858048d5758b6
2026-04-24 20:52:07 +0000 to 2026-05-01 22:36:41 +0000
- chore(deps): update compatible (rust-lang/cargo#16952)
- feat(lints): Add deny-by-default text_direction_codepoint lints (rust-lang/cargo#16950)
- chore(deps): update embarkstudios/cargo-deny-action action to v2.0.17 (rust-lang/cargo#16953)
- docs(guide): Switch from third-party to first-party unused deps detection (rust-lang/cargo#16946)
- Remove curl dependency from crates-io crate (rust-lang/cargo#16936)
- chore(deps): update gix to 0.83 (rust-lang/cargo#16945)
- fix(compile): Where possible, hint about misplaced deps  (rust-lang/cargo#16940)
- Remove `windows-sys` from `home` (rust-lang/cargo#16918)
- docs(resolver): `--precise <yanked>` is on stable (rust-lang/cargo#16944)
- Update `gix` to 0.82 (with security fixes and hardened parsers) (rust-lang/cargo#16941)
@rustbot rustbot added this to the 1.97.0 milestone May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-documenting-cargo-itself Area: Cargo's documentation A-workspaces Area: workspaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add text-direction-codepoint-in-comment lint Add text-direction-codepoint-in-literal lint

4 participants