Cognitive Complexity, Because Testability != Understandability
Blog post from Sonar
SonarSource is introducing `Cognitive Complexity` as an alternative to `Cyclomatic Complexity`, which measures testability, but not maintainability. Cognitive Complexity aims to provide a fair representation of how difficult control flow in a method is to understand and maintain. It increments for structures that break the linear flow of code, nesting, and ignores "shorthand" structures. The new metric is designed to incent good coding practices by penalizing complex constructs and ignoring readable ones. Cognitive Complexity will be added as a method-level rule in mainline languages, initially starting with Java, JavaScript, C#, and C/C++/Objective-C, with the goal of eventually adding class/file-level rules.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.