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

rustfmt fixes #125637

Merged
merged 3 commits into from
May 28, 2024
Merged

rustfmt fixes #125637

merged 3 commits into from
May 28, 2024

Commits on May 28, 2024

  1. Remove out-of-date comment.

    This comment -- "by default we ignore everything in the repository" --
    was added in rust-lang#65939 when rustfmt was first being introduced for this
    repository and (briefly) every directory was ignored. Since then lots of
    directories have opted in to formatting, so it is no longer true.
    nnethercote committed May 28, 2024
    Configuration menu
    Copy the full SHA
    bcfa67d View commit details
    Browse the repository at this point in the history
  2. Fix comments.

    Some are too long, some aren't complete sentences, some are complete
    sentences but don't bother with an upper case letter at the start. All
    annoying and hurt readability.
    nnethercote committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4702a1c View commit details
    Browse the repository at this point in the history
  3. Don't format tests/run-make/*/rmake.rs.

    It's reasonable to want to, but in the current implementation this
    causes multiple problems.
    
    - All the `rmake.rs` files are formatted every time even when they
      haven't changed. This is because they get whitelisted unconditionally
      in the `OverrideBuilder`, before the changed files get added.
    
    - The way `OverrideBuilder` works, if any files gets whitelisted then no
      unmentioned files will get traversed. This is surprising, and means
      that the `rmake.rs` entries broke the use of explicit paths to `x
      fmt`, and also broke `GITHUB_ACTIONS=true git check --fmt`.
    
    The commit removes the `rmake.rs` entries, fixes the formatting of a
    couple of files that were misformatted (not previously caught due to the
    `GITHUB_ACTIONS` breakage), and bans `!`-prefixed entries in
    `rustfmt.toml` because they cause all these problems.
    nnethercote committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f1b0ca0 View commit details
    Browse the repository at this point in the history