Skip to content

Commit

Permalink
feat(lsp): noExcessiveCognitiveComplexity diagnostic shows levels
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Sep 21, 2024
1 parent 29266a0 commit 9322acd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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. \
Expand Down

0 comments on commit 9322acd

Please sign in to comment.