diff --git a/crates/biome_js_analyze/src/lint/complexity/no_excessive_cognitive_complexity.rs b/crates/biome_js_analyze/src/lint/complexity/no_excessive_cognitive_complexity.rs index e7f0390a094a..9db7c6f936f0 100644 --- a/crates/biome_js_analyze/src/lint/complexity/no_excessive_cognitive_complexity.rs +++ b/crates/biome_js_analyze/src/lint/complexity/no_excessive_cognitive_complexity.rs @@ -117,7 +117,10 @@ impl Rule for NoExcessiveCognitiveComplexity { RuleDiagnostic::new( rule_category!(), range, - markup!("Excessive complexity detected."), + markup!({ + format!("Excessive complexity of {calculated_score} detected \ + (max: {max_allowed_complexity}).") + }), ) .note(if calculated_score == &MAX_SCORE { "Please refactor this function to reduce its complexity. \