mirror of
https://github.com/github/codeql.git
synced 2026-03-30 04:08:16 +02:00
CPP: Modify NVIHub.ql.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* to enforce invariants that should hold for the whole hierarchy.
|
||||
* This is especially problematic in classes with many
|
||||
* dependencies or dependents.
|
||||
* @kind table
|
||||
* @kind problem
|
||||
* @id cpp/nvi-hub
|
||||
* @problem.severity recommendation
|
||||
* @precision low
|
||||
@@ -22,4 +22,4 @@ where f.hasSpecifier("public") and
|
||||
fclass = f.getDeclaringType() and
|
||||
hubIndex = fclass.getMetrics().getAfferentCoupling() * fclass.getMetrics().getEfferentCoupling() and
|
||||
hubIndex > 100
|
||||
select f.getFile(), f, "Avoid having public virtual methods (NVI idiom)"
|
||||
select f, "Avoid having public virtual methods (NVI idiom)"
|
||||
|
||||
Reference in New Issue
Block a user