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