Issue 178959
Summary `readability-function-cognitive-complexity` should have an *upper* bound above which it's just a warning
Labels new issue
Assignees
Reporter BenFrantzDale
    `readability-function-cognitive-complexity` is great, but for a large team on a large codebase, with many overgrown functions, it's hard to start using it. Do you tell everyone they are free to add `// NONLINTNEXTLINE(readability-function-cognitive-complexity)`? Do you pro-actively litter the code with `// NONLINTNEXTLINE(readability-function-cognitive-complexity)`?

What I'd like is `readability-function-cognitive-complexity.JustWarnAboveThreshold` so I can say that a threshold of 25 (the default `Threshold`) is fatal, but above, say, 50, it's not just "a little bad", but too far gone to bother. We could then nudge that upper bound up over time, but just starting in to using `readability-function-cognitive-complexity` my primary interest is preventing functions that are now at 24 from getting to 26, and as it is right now, I can't do that without also either disrupting my team or making a lot of lines of code change.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to