CPP: Modify NVIHub.ql.

This commit is contained in:
Geoffrey White
2018-11-21 13:11:08 +00:00
parent 1c27c5e5ed
commit b4846dc995

View File

@@ -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)"