SEM004 : Cyclomatic complexity
Introduction
Section titled “Introduction”Description
Section titled “Description”Metrics rule - calculates code cyclomatic complexity.
How to fix
Section titled “How to fix”The rule is only informational.
The rule has a Batch scope and is applied only on the SQL script.
Parameters
Section titled “Parameters”Rule has no parameters.
Remarks
Section titled “Remarks”The rule does not need Analysis Context or SQL Connection.
Effort To Fix
Section titled “Effort To Fix”Not configured.
Categories
Section titled “Categories”Metrics
Additional Information
Section titled “Additional Information”There is no additional info for this rule.
Example Test SQL
Section titled “Example Test SQL”BEGIN TRY
IF (12 <1 ) SELECT 1 ELSE SELECT 2
END TRYBEGIN CATCH
IF (12 <1 ) SELECT 1 ELSE SELECT 2
END CATCH
IF (12 <1 ) SELECT 1ELSE IF (12 <1 ) SELECT 1 ELSE SELECT 2
IF (12>1) SELECT 4ELSE SELECT 5Analysis Results
Section titled “Analysis Results”| Message | Line | Column | |
|---|---|---|---|
| 1 | SEM004 : CyclomaticComplexity=7 | 0 | 0 |