-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
A-lintArea: New lintsArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-correctnessLint: Belongs in the correctness lint groupLint: Belongs in the correctness lint groupL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupT-MIRType: This lint will require working with the MIRType: This lint will require working with the MIRT-middleType: Probably requires verifiying typesType: Probably requires verifiying types
Description
Based on this HIC++ guideline, in addition to the existing cyclomatic complexity lint. It basically comes down to the possible number of branches in a function's code path, not counting loops. E.g. this is okay:
if this { that }
else { or_that } // Just 2 code paths
Wherease this is not so cool:
if this1 { that1(); } // ... 2 paths (do or don't)
if this2 { that2(); } // ... 4 paths
if this3 { that3(); } // ... 8 paths
...
if this10 { that10(); } // ... 1024 paths - Have fun with unit testing!
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-correctnessLint: Belongs in the correctness lint groupLint: Belongs in the correctness lint groupL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupT-MIRType: This lint will require working with the MIRType: This lint will require working with the MIRT-middleType: Probably requires verifiying typesType: Probably requires verifiying types