Skip to content

Commit 3cd151d

Browse files
committed
Auto merge of #8040 - xFrednet:6610-known-problems-section-for-pre-expansion, r=camsteffen
Updated known problems section for pre-expansion lints about level attributes Our last three pre-macro expansion lints aren't affected by lint level attributes. This adds a comment to the know problems section of them. I've also updated some CSS to add some spacing after lists on Clippy's lint list: Before: ![image](https://user-images.githubusercontent.com/17087237/143783579-064326d4-4e58-4d7d-bbe4-fad8b115fcd4.png) After: ![image](https://user-images.githubusercontent.com/17087237/143783650-9803fa03-c332-4e0e-886f-523d4217c6e6.png) --- changelog: [`print_stdout`], [`print_stderr`], [`dbg_macro`]: Document how the lint level can be changed and reference #6610 cc: #6610
2 parents be1a73b + 17b7478 commit 3cd151d

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

clippy_lints/src/dbg_macro.rs

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ declare_clippy_lint! {
1515
/// `dbg!` macro is intended as a debugging tool. It
1616
/// should not be in version control.
1717
///
18+
/// ### Known problems
19+
/// * The lint level is unaffected by crate attributes. The level can still
20+
/// be set for functions, modules and other items. To change the level for
21+
/// the entire crate, please use command line flags. More information and a
22+
/// configuration example can be found in [clippy#6610].
23+
///
24+
/// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
25+
///
1826
/// ### Example
1927
/// ```rust,ignore
2028
/// // Bad

clippy_lints/src/write.rs

+14-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ declare_clippy_lint! {
7272
/// application and might forget to remove those prints afterward.
7373
///
7474
/// ### Known problems
75-
/// Only catches `print!` and `println!` calls.
75+
/// * Only catches `print!` and `println!` calls.
76+
/// * The lint level is unaffected by crate attributes. The level can still
77+
/// be set for functions, modules and other items. To change the level for
78+
/// the entire crate, please use command line flags. More information and a
79+
/// configuration example can be found in [clippy#6610].
80+
///
81+
/// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
7682
///
7783
/// ### Example
7884
/// ```rust
@@ -94,7 +100,13 @@ declare_clippy_lint! {
94100
/// application and might forget to remove those prints afterward.
95101
///
96102
/// ### Known problems
97-
/// Only catches `eprint!` and `eprintln!` calls.
103+
/// * Only catches `eprint!` and `eprintln!` calls.
104+
/// * The lint level is unaffected by crate attributes. The level can still
105+
/// be set for functions, modules and other items. To change the level for
106+
/// the entire crate, please use command line flags. More information and a
107+
/// configuration example can be found in [clippy#6610].
108+
///
109+
/// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
98110
///
99111
/// ### Example
100112
/// ```rust

util/gh-pages/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ <h2 class="panel-title">
336336
</h2>
337337
</header>
338338

339-
<ul class="list-group lint-docs" ng-class="{collapse: true, in: open[lint.id]}">
339+
<div class="list-group lint-docs" ng-class="{collapse: true, in: open[lint.id]}">
340340
<div class="list-group-item lint-doc-md" ng-bind-html="lint.docs | markdown"></div>
341341
<div class="lint-additional-info-container">
342342
<!-- Applicability -->
@@ -359,7 +359,7 @@ <h2 class="panel-title">
359359
<a href="https://github.com/rust-lang/rust-clippy/blob/{{docVersion}}/clippy_lints/{{lint.id_span.path}}#L{{lint.id_span.line}}">View Source</a>
360360
</div>
361361
</div>
362-
</ul>
362+
</div>
363363
</article>
364364
</div>
365365
</div>

0 commit comments

Comments
 (0)