@Override public void leaveNode(AstNode node) { SourceFunction function = (SourceFunction) getContext().peekSourceCode(); if (function.getInt(PythonMetric.COMPLEXITY) > maximumFunctionComplexityThreshold) { getContext().createLineViolation(this, "Function has a complexity of {0,number,integer} which is greater than {1,number,integer} authorized.", node, function.getInt(PythonMetric.COMPLEXITY), maximumFunctionComplexityThreshold); } }
@Override public void leaveNode(AstNode node) { SourceFunction function = (SourceFunction) getContext().peekSourceCode(); if (function.getInt(FlexMetric.COMPLEXITY) > maximumFunctionComplexityThreshold) { getContext().createLineViolation(this, "Function has a complexity of {0,number,integer} which is greater than {1,number,integer} authorized.", node, function.getInt(FlexMetric.COMPLEXITY), maximumFunctionComplexityThreshold); } }
@Override public void leaveNode(AstNode node) { SourceFunction function = (SourceFunction) getContext().peekSourceCode(); if (function.getInt(EcmaScriptMetric.COMPLEXITY) > maximumFunctionComplexityThreshold) { getContext().createLineViolation(this, "Function has a complexity of {0,number,integer} which is greater than {1,number,integer} authorized.", node, function.getInt(EcmaScriptMetric.COMPLEXITY), maximumFunctionComplexityThreshold); } }
@Override public void leaveNode(AstNode node) { SourceFunction function = (SourceFunction) getContext().peekSourceCode(); if (function.getInt(PHPMetric.COMPLEXITY) > threshold) { getContext().createLineViolation(this, "The Cyclomatic Complexity of this function {0} is {1} which is greater than {2} authorized.", node, FunctionUtils.getFunctionName(node), function.getInt(PHPMetric.COMPLEXITY), threshold); } }