Strict Cyclomatic Complexity is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.
Strict Cyclomatic Complexity
API ID: CyclomaticStrictAlso Known As: Strict Cyclomatic Complexity (CC2)
Languages: Ada, Assembly, Basic, C#, C++, Fortran, Java, Jovial, Pascal, Python, Rust, VHDL, Web
Targets: Files, Functions, Modules, Packages, Subprograms
Strict McCabe Cyclomatic Complexity.
The Cyclomatic Complexity with logical conjunction and logical and in conditional expressions also adding 1 to the complexity for each of their occurrences. i.e. The statement 'if (a && b || c)' would have a cyclomatic complexity of 1 but a strict cyclomatic complexity of 3
Also known as McCabe - Strict Cyclomatic Complexity (CC2).
- Ada: Type, Entry, Function, Package, Procedure, Protected, Task
- Basic: Method
- C#: Method
- C++: Function
- Fortran: Module, Block Data, Function, Program, Subroutine
- Java: Method
- Jovial: Subroutine
- Pascal: Compunit, Function, Procedure
- Python: File, Function
- Rust: Function
- VHDL: Procedure, Function, Process
- Web: File
- The cyclomatic metric used is configured from "Project Configuration/Metrics/Complexity". This metric results from having "Count each decision in a multi-way-decision structure" on and having "Count logical conjuctions (OR) and logical and (AND)" on. Checking "Show all available cyclomatic complexity metric variants" will also enable the metric.