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

chore(style): sync submodule exclusion list between tidy and rustfmt #132524

Conversation

ismailarilik
Copy link
Contributor

As asked in the FIXME comments

@rustbot
Copy link
Collaborator

rustbot commented Nov 2, 2024

r? @jieyouxu

rustbot has assigned @jieyouxu.
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 A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc 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 Nov 2, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, r=me after PR CI is green.

@@ -7,7 +7,6 @@ use ignore::DirEntry;

/// The default directory filter.
pub fn filter_dirs(path: &Path) -> bool {
// FIXME: sync submodule exclusion list with rustfmt.toml
Copy link
Member

Choose a reason for hiding this comment

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

Discussion: @onur-ozkan should tidy be reading from rustfmt.toml or we somehow make sure that there's a single source of truth for this? (not for this PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Skip lists for rustfmt and tidy seem not overlapping but if tidy needs to include the skip list of rustfmt, I wanna work on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

My other concern is that highlighted rows in the screenshot above (from rustfmt.toml) are not submodules. Maybe some time ago, they were and added to that list. But now they are managed inside the rust repo and rustfmt doesn't format them. I've tried to run x fmt for them and found a lot of errors. Shouldn't they be formatted like other files in the rust repo as well?

Copy link
Member

@jieyouxu jieyouxu Nov 2, 2024

Choose a reason for hiding this comment

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

Some of them are not submodules but subtrees and managed by josh, so I don't think this is easily sync'd. Asking Onur because I might be missing context for these particular lists.

Copy link
Member

Choose a reason for hiding this comment

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

IIRC we don't want tidy to rely on a toml parser because it needs to build fast, so probably not sync'd easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So how about relying on .gitmodules file for both rustfmt and tidy?

@jieyouxu
Copy link
Member

jieyouxu commented Nov 5, 2024

But anyway, if we do want to sync it should be a follow-up, this PR itself is fine AFAICT. Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 5, 2024

📌 Commit 4e0d71f has been approved by jieyouxu

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 Nov 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 5, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#132259 (rustc_codegen_llvm: Add a new 'pc' option to branch-protection)
 - rust-lang#132409 (CI: switch 7 linux jobs to free runners)
 - rust-lang#132498 (Suggest fixing typos and let bindings at the same time)
 - rust-lang#132524 (chore(style): sync submodule exclusion list between tidy and rustfmt)
 - rust-lang#132567 (Properly suggest `E::assoc` when we encounter `E::Variant::assoc`)
 - rust-lang#132571 (add const_eval_select macro to reduce redundancy)
 - rust-lang#132637 (Do not filter empty lint passes & re-do CTFE pass)
 - rust-lang#132642 (Add documentation on `ast::Attribute`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b524be5 into rust-lang:master Nov 6, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 6, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 6, 2024
Rollup merge of rust-lang#132524 - ismailarilik:chore/style/sync-submodule-exclusion-list-between-tidy-and-rustfmt, r=jieyouxu

chore(style): sync submodule exclusion list between tidy and rustfmt

As asked in the FIXME comments
@ismailarilik ismailarilik deleted the chore/style/sync-submodule-exclusion-list-between-tidy-and-rustfmt branch November 6, 2024 05:46
@ismailarilik ismailarilik restored the chore/style/sync-submodule-exclusion-list-between-tidy-and-rustfmt branch November 6, 2024 05:46
@ismailarilik ismailarilik deleted the chore/style/sync-submodule-exclusion-list-between-tidy-and-rustfmt branch November 6, 2024 05:48
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 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.

4 participants