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

setup typos check in CI #134006

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

setup typos check in CI #134006

wants to merge 18 commits into from

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Dec 7, 2024

This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying?

Also includes commits with actual typo fixes.

MCP: rust-lang/compiler-team#817

typos check currently turned for:

  • ./compiler
  • ./library
  • ./src/bootstrap
  • ./src/librustdoc

After merging, PRs which enables checks for other crates (tools) can be implemented too.

Found typos will not break other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr.

Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.

@rustbot
Copy link
Collaborator

rustbot commented Dec 7, 2024

r? @nnethercote

rustbot has assigned @nnethercote.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Dec 7, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 7, 2024

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred to the CTFE machinery

cc @rust-lang/wg-const-eval

Some changes occurred in match checking

cc @Nadrieril

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-log-analyzer

This comment has been minimized.

@klensy klensy force-pushed the typos branch 2 times, most recently from f01ec3c to 5b7daa7 Compare December 7, 2024 12:21
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Dec 7, 2024

The Miri subtree was changed

cc @rust-lang/miri

@@ -795,7 +795,7 @@ impl<'a> Parser<'a> {
// When there are a few keywords in the last ten elements of `self.expected_tokens` and the current
// token is an identifier, it's probably a misspelled keyword.
// This handles code like `async Move {}`, misspelled `if` in match guard, misspelled `else` in `if`-`else`
// and mispelled `where` in a where clause.
// and misspelled `where` in a where clause.
Copy link
Member

Choose a reason for hiding this comment

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

they misspelled "misspelled" 😀

typos.toml Outdated Show resolved Hide resolved
typos.toml Outdated Show resolved Hide resolved
typos.toml Show resolved Hide resolved
@Nadrieril
Copy link
Member

I seem to recall a previous attempt at having typo-checks in CI that had a ton of false positives, this is much nicer, thanks. I can't approve the CI addition myself (does this require an FCP maybe?), but I looked through the typo fixes and they all look good to me.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the A-meta Area: Issues & PRs about the rust-lang/rust repository itself label Dec 7, 2024
typos.toml Outdated Show resolved Hide resolved
@lqd
Copy link
Member

lqd commented Dec 7, 2024

does this require an FCP maybe?

maybe an MCP?

Comment on lines +10 to +17
# Add exclusions here, lines should be like `x = "x"`, where `x` is excluded word.
#
# Also see docs: https://github.com/crate-ci/typos/blob/v1.28.2/docs/reference.md
Copy link
Member

Choose a reason for hiding this comment

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

Based on the documentation these aren't exclusions, they're custom additions to the dictionary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it is one of the ways to silence linter, so i wrote as exclusions, to simplify wording.

@rustbot rustbot added O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface labels Dec 7, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 7, 2024

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @rust-lang/wg-const-eval

Some changes occurred to the platform-builtins intrinsics. Make sure the
LLVM backend as well as portable-simd gets adapted for the changes.

cc @antoyo, @GuillaumeGomez, @bjorn3, @calebzulawski, @programmerjake

typos.toml Outdated Show resolved Hide resolved
typos.toml Outdated Show resolved Hide resolved
@klensy
Copy link
Contributor Author

klensy commented Dec 10, 2024

At time of MCP I had an idea, but reality of github CI action implementation prevented some nicer part of it, so i will revert to simple implementation and will resolve review comments.

@rustbot
Copy link
Collaborator

rustbot commented Dec 11, 2024

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@klensy
Copy link
Contributor Author

klensy commented Dec 11, 2024

Oops, weird rebase.

@@ -4484,7 +4484,7 @@ declare_lint! {
///
/// `refining_impl_trait` is a lint group composed of two lints:
///
/// * `refining_impl_trait_reachable`, for refinements that are publically
/// * `refining_impl_trait_reachable`, for refinements that are publicly
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't need changing; likewise the one just below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

typos.toml Outdated Show resolved Hide resolved
@bors
Copy link
Contributor

bors commented Dec 19, 2024

☔ The latest upstream changes (presumably #133793) made this pull request unmergeable. Please resolve the merge conflicts.

@klensy
Copy link
Contributor Author

klensy commented Dec 30, 2024

Resolved more reviews and added new typo fixes.

@rustbot
Copy link
Collaborator

rustbot commented Jan 5, 2025

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface S-waiting-on-MCP Status: PR has a compiler MCP and is waiting for the compiler MCP to complete. 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.