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

Allow formatting specific subdirectories #84783

Merged
merged 1 commit into from
May 11, 2021
Merged

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented May 1, 2021

Fixes #71094.

@jyn514 jyn514 added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 1, 2021
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2021
Some(first) => {
let mut walker = WalkBuilder::new(first);
for path in &paths[1..] {
walker.add(path);
Copy link
Member

Choose a reason for hiding this comment

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

Hm. This doesn't do any verification of what the passed path is, which might be a problem. I'm not sure the ignore_fmt rules will work when not rooted at the build.src.clone() start; have you checked that e.g. passing src/test/ui doesn't change anything? If not, this isn't quite the right fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

have you checked that e.g. passing src/test/ui doesn't change anything

I have now! 😆 and there are no changes; I have a hard time believing everything there is formatted how rustfmt likes it, so I think we're good :)

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 6, 2021
@jyn514 jyn514 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 7, 2021
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 10, 2021

📌 Commit dadcb05 has been approved by Mark-Simulacrum

@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 May 10, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 10, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request May 11, 2021
Rollup of 7 pull requests

Successful merges:

 - rust-lang#84777 (Apply `--cfg parallel_compiler` when documenting)
 - rust-lang#84783 (Allow formatting specific subdirectories)
 - rust-lang#84998 (Show nicer error when an 'unstable fingerprints' error occurs)
 - rust-lang#85002 (RELEASES.md: Use broken_intra_doc_links as an example, not nightly lint)
 - rust-lang#85051 (Allow checking miri and RLS with `x.py check src/tools/{miri,rls}`)
 - rust-lang#85114 (Remove outdated FIXME for download-rustc)
 - rust-lang#85143 (Document Rc::from)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7e827e9 into rust-lang:master May 11, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 11, 2021
@jyn514 jyn514 deleted the fmt-one branch May 11, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. 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.

x.py fmt silently ignores argument
5 participants