-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn't
Description
Summary
I've been trying the cognitive complexity lint and I have found that on async functions it doesn't work. Here is an example, clippy will complain about complex, but not about complex_async:
#![allow(clippy::all)]
#![deny(clippy::cognitive_complexity)]
pub async fn complex_async() {
let a = 0;
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
}
pub fn complex() {
let a = 0;
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
if a == 0 {}
}
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn't