Skip to content

Commit e5b69df

Browse files
committed
Add lint output to lint list
1 parent 542d474 commit e5b69df

File tree

10 files changed

+246
-32
lines changed

10 files changed

+246
-32
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ rustc_tools_util = { version = "0.2", path = "rustc_tools_util" }
5959
[features]
6060
deny-warnings = ["clippy_lints/deny-warnings"]
6161
integration = ["tempfile"]
62-
internal = ["clippy_lints/internal"]
62+
internal = ["clippy_lints/internal", "tempfile"]
6363

6464
[package.metadata.rust-analyzer]
6565
# This package uses #[feature(rustc_private)]

clippy_lints/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ edition = "2021"
1010

1111
[dependencies]
1212
cargo_metadata = "0.14"
13+
clippy_dev = { path = "../clippy_dev", optional = true }
1314
clippy_utils = { path = "../clippy_utils" }
1415
if_chain = "1.0"
1516
itertools = "0.10.1"
@@ -18,6 +19,7 @@ quine-mc_cluskey = "0.2"
1819
regex-syntax = "0.6"
1920
serde = { version = "1.0", features = ["derive"] }
2021
serde_json = { version = "1.0", optional = true }
22+
tempfile = { version = "3.3.0", optional = true }
2123
toml = "0.5"
2224
unicode-normalization = "0.1"
2325
unicode-script = { version = "0.5", default-features = false }
@@ -30,7 +32,7 @@ url = { version = "2.2", features = ["serde"] }
3032
[features]
3133
deny-warnings = ["clippy_utils/deny-warnings"]
3234
# build clippy with internal lints enabled, off by default
33-
internal = ["clippy_utils/internal", "serde_json"]
35+
internal = ["clippy_utils/internal", "serde_json", "tempfile", "clippy_dev"]
3436

3537
[package.metadata.rust-analyzer]
3638
# This crate uses #[feature(rustc_private)]

clippy_lints/src/collapsible_if.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ declare_clippy_lint! {
3232
/// makes code look more complex than it really is.
3333
///
3434
/// ### Example
35-
/// ```rust,ignore
35+
/// ```rust
36+
/// # let (x, y) = (true, true);
3637
/// if x {
3738
/// if y {
38-
/// …
39+
/// //
3940
/// }
4041
/// }
41-
///
4242
/// ```
4343
///
4444
/// Use instead:
45-
///
46-
/// ```rust,ignore
45+
/// ```rust
46+
/// # let (x, y) = (true, true);
4747
/// if x && y {
48-
/// …
48+
/// //
4949
/// }
5050
/// ```
5151
#[clippy::version = "pre 1.29.0"]

clippy_lints/src/doc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ declare_clippy_lint! {
178178
/// if the `fn main()` is left implicit.
179179
///
180180
/// ### Examples
181-
/// ``````rust
181+
/// ```rust
182182
/// /// An example of a doctest with a `main()` function
183183
/// ///
184184
/// /// # Examples
@@ -191,7 +191,7 @@ declare_clippy_lint! {
191191
/// fn needless_main() {
192192
/// unimplemented!();
193193
/// }
194-
/// ``````
194+
/// ```
195195
#[clippy::version = "1.40.0"]
196196
pub NEEDLESS_DOCTEST_MAIN,
197197
style,

clippy_lints/src/large_include_file.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ declare_clippy_lint! {
2222
/// let included_bytes = include_bytes!("very_large_file.txt");
2323
/// ```
2424
///
25-
/// Instead, you can load the file at runtime:
25+
/// Use instead:
2626
/// ```rust,ignore
2727
/// use std::fs;
2828
///
29+
/// // You can load the file at runtime
2930
/// let string = fs::read_to_string("very_large_file.txt")?;
3031
/// let bytes = fs::read("very_large_file.txt")?;
3132
/// ```

clippy_lints/src/literal_representation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ declare_clippy_lint! {
4646
/// - Does not match on `_127` since that is a valid grouping for decimal and octal numbers
4747
///
4848
/// ### Example
49+
/// ```ignore
4950
/// `2_32` => `2_i32`
5051
/// `250_8 => `250_u8`
5152
/// ```

clippy_lints/src/methods/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,7 @@ declare_clippy_lint! {
10391039
///
10401040
/// // Good
10411041
/// _.split('x');
1042+
/// ```
10421043
#[clippy::version = "pre 1.29.0"]
10431044
pub SINGLE_CHAR_PATTERN,
10441045
perf,

0 commit comments

Comments
 (0)