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

Add command line lint manipulation in rustdoc #51732

Merged
merged 1 commit into from
Jul 6, 2018

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 23, 2018
@stokhos
Copy link

stokhos commented Jun 29, 2018

ping from triage @QuietMisdreavus will you have time to review this PR in the near future?

Copy link
Member

@QuietMisdreavus QuietMisdreavus left a comment

Choose a reason for hiding this comment

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

Looks good, thanks so much! Just a couple style things.

@@ -213,7 +217,7 @@ pub fn run_core(search_paths: SearchPaths,
} else {
vec![]
},
lint_cap: Some(lint::Forbid),
lint_cap: Some(lint_cap.unwrap_or_else(|| lint::Forbid)),
Copy link
Member

Choose a reason for hiding this comment

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

You can leave this as None if you're going to default it to Forbid anyway; rustc will do this unwrap itself later on.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I did at first but didn't get the expected result.

Copy link
Member

Choose a reason for hiding this comment

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

Huh, weird, I didn't realize it was unwrapped anywhere other than where it was used.

"cap-lints",
"Set the most restrictive lint level. \
More restrictive lints are capped at this \
level. Byt default, it is at `forbid` level.",
Copy link
Member

Choose a reason for hiding this comment

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

Typo, "byt default"

@QuietMisdreavus
Copy link
Member

r=me pending travis

@GuillaumeGomez
Copy link
Member Author

@bors: r=QuietMisdreavus

@bors
Copy link
Contributor

bors commented Jul 5, 2018

📌 Commit e221be8 has been approved by QuietMisdreavus

@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 Jul 5, 2018
@bors
Copy link
Contributor

bors commented Jul 5, 2018

⌛ Testing commit e221be8 with merge 00f4972...

bors added a commit that referenced this pull request Jul 5, 2018
…isdreavus

Add command line lint manipulation in rustdoc

Fixes #50082.

r? @QuietMisdreavus
@bors
Copy link
Contributor

bors commented Jul 6, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: QuietMisdreavus
Pushing 00f4972 to master...

@bors bors merged commit e221be8 into rust-lang:master Jul 6, 2018
@GuillaumeGomez GuillaumeGomez deleted the cmd-line-lint-rustdoc branch July 6, 2018 08:41
bors added a commit that referenced this pull request Jul 20, 2018
stabilize lint handling in rustdoc

When #51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period.

Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them.

r? @rust-lang/rustdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants