We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The lint does not detect the long function which is the second main in the example, however, it detects the problem in the first main.
main
The clippy.toml:
clippy.toml
too-many-lines-threshold = 2
The code:
#![deny(clippy::all)] #![deny(clippy::pedantic)] fn f() -> u16 { 0 } // This fails the check (should). //fn main() { // println!("Hello, world!"); // println!("Hello,1 world!"); // println!("Hello,12 world!"); //} // This passes (shouldn't). fn main() { println!("Hello, world! {}", f()); println!("Hello,1 world!"); println!("Hello,12 world!"); println!("Hello1, world!"); println!("Hello,2 world!"); println!("Hello, 5world!"); println!("Hello, w6orld!"); }
clippy 0.0.212 (b029042 2019-07-12)
I was able to reproduce the problem with a single println!("Hello, world! {}", f()) statement - every line after such a statement is not counted.
println!("Hello, world! {}", f())
The text was updated successfully, but these errors were encountered:
0ae1a69
No branches or pull requests
The lint does not detect the long function which is the second
main
in the example, however, it detects the problem in the first main.The
clippy.toml
:The code:
I was able to reproduce the problem with a single
println!("Hello, world! {}", f())
statement - every line after such a statement is not counted.The text was updated successfully, but these errors were encountered: