rust/tests/ui/cognitive_complexity.stderr
Krishna Veera Reddy 91a491e68e Reduce cognitive complexity lint span
Currently the cognitive complexity lint spans the entire function
body making it really difficult to read and refactor the code in
editors. To fix this we reduce the lint span to the function name.
2019-12-21 18:07:53 -08:00

140 lines
3.6 KiB
Plaintext

error: the function has a cognitive complexity of (28/25)
--> $DIR/cognitive_complexity.rs:6:4
|
LL | fn main() {
| ^^^^
|
= note: `-D clippy::cognitive-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (7/1)
--> $DIR/cognitive_complexity.rs:91:4
|
LL | fn kaboom() {
| ^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:149:4
|
LL | fn baa() {
| ^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:150:13
|
LL | let x = || match 99 {
| ^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:167:4
|
LL | fn bar() {
| ^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:186:4
|
LL | fn barr() {
| ^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (3/1)
--> $DIR/cognitive_complexity.rs:196:4
|
LL | fn barr2() {
| ^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:212:4
|
LL | fn barrr() {
| ^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (3/1)
--> $DIR/cognitive_complexity.rs:222:4
|
LL | fn barrr2() {
| ^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:238:4
|
LL | fn barrrr() {
| ^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (3/1)
--> $DIR/cognitive_complexity.rs:248:4
|
LL | fn barrrr2() {
| ^^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:264:4
|
LL | fn cake() {
| ^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (4/1)
--> $DIR/cognitive_complexity.rs:274:8
|
LL | pub fn read_file(input_path: &str) -> String {
| ^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:305:4
|
LL | fn void(void: Void) {
| ^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (8/1)
--> $DIR/cognitive_complexity.rs:356:4
|
LL | fn early_ret() -> i32 {
| ^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:377:13
|
LL | let x = |a: i32, b: i32| -> i32 {
| ^^^^^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:390:8
|
LL | fn moo(&self) {
| ^^^
|
= help: you could split it up into multiple smaller functions
error: aborting due to 17 previous errors