-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Enforce even more the code blocks attributes check through rustdoc #71670
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
Merged
bors
merged 4 commits into
rust-lang:master
from
GuillaumeGomez:enforce-codeblocks-attribute-check
Jul 18, 2020
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
aabca44
Enforce even more the code blocks attributes check through rustdoc
GuillaumeGomez d70e6e1
Apply review comments
GuillaumeGomez 3dc8544
Update code to new invalid_codeblock_attributes lint name
GuillaumeGomez 5f6c079
Set "invalid_codeblock_attributes" lint to warning level by default
GuillaumeGomez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,7 +315,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt | |
let missing_doc_example = rustc_lint::builtin::MISSING_DOC_CODE_EXAMPLES.name; | ||
let private_doc_tests = rustc_lint::builtin::PRIVATE_DOC_TESTS.name; | ||
let no_crate_level_docs = rustc_lint::builtin::MISSING_CRATE_LEVEL_DOCS.name; | ||
let invalid_codeblock_attribute_name = rustc_lint::builtin::INVALID_CODEBLOCK_ATTRIBUTES.name; | ||
let invalid_codeblock_attributes_name = rustc_lint::builtin::INVALID_CODEBLOCK_ATTRIBUTES.name; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! |
||
|
||
// In addition to those specific lints, we also need to allow those given through | ||
// command line, otherwise they'll get ignored and we don't want that. | ||
|
@@ -325,12 +325,12 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt | |
missing_doc_example.to_owned(), | ||
private_doc_tests.to_owned(), | ||
no_crate_level_docs.to_owned(), | ||
invalid_codeblock_attribute_name.to_owned(), | ||
invalid_codeblock_attributes_name.to_owned(), | ||
]; | ||
|
||
let (lint_opts, lint_caps) = init_lints(allowed_lints, lint_opts, |lint| { | ||
if lint.name == intra_link_resolution_failure_name | ||
|| lint.name == invalid_codeblock_attribute_name | ||
|| lint.name == invalid_codeblock_attributes_name | ||
{ | ||
None | ||
} else { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be
-D...
but rather-W
, with-Dwarnings
upgrading that only when--deny=warnings
or equivalent is passed to x.py.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same answer as I provided here.