@Test public void test() { MethodComplexityCheck check = new MethodComplexityCheck(); check.setMaximumFunctionComplexityThreshold(0); SourceFile file = LuaAstScanner.scanSingleFile(new File("src/test/resources/checks/methodComplexity.lua"), check); CheckMessagesVerifier.verify(file.getCheckMessages()) .next().atLine(1).withMessage("Method has a complexity of 6 which is greater than 0 authorized.") .next().atLine(3).withMessage("Method has a complexity of 2 which is greater than 0 authorized.") .next().atLine(4).withMessage("Method has a complexity of 1 which is greater than 0 authorized.") .next().atLine(11).withMessage("Method has a complexity of 1 which is greater than 0 authorized.") .noMore(); }
public void setMaximumFunctionComplexityThreshold(int threshold) { this.maximumMethodComplexityThreshold = threshold; }
MethodComplexityCheck extends LuaCheck { public void setMaximumFunctionComplexityThreshold(int threshold) { this.maximumMethodComplexityThreshold = threshold; } }
MethodComplexityCheck extends LuaCheck { public void setMaximumFunctionComplexityThreshold(int threshold) { this.maximumMethodComplexityThreshold = threshold; }  }
MethodComplexityCheck extends LuaCheck { public void setMaximumFunctionComplexityThreshold(int threshold) { this.maximumMethodComplexityThreshold = threshold; }  @Override void init(); @Override void leaveNode(AstNode node); void setMaximumFunctionComplexityThreshold(int threshold); }
MethodComplexityCheck extends LuaCheck { public void setMaximumFunctionComplexityThreshold(int threshold) { this.maximumMethodComplexityThreshold = threshold; }  @Override void init(); @Override void leaveNode(AstNode node); void setMaximumFunctionComplexityThreshold(int threshold); static final String CHECK_KEY; }