@Test public void executable_lines() throws Exception { scan("" + "package abc;\n" + "import x;\n" + "class A {\n" + " fun foo() {\n" + " statementOnSeveralLines(a,\n" + " b);\n" + " };\n" + "}\n" + "{\n" + " x = 42;\n" + "};"); assertThat(visitor.executableLines()).containsExactly(5, 10); }
public Set<Integer> executableLines() { return executableLines; }
MetricVisitor extends TreeVisitor<InputFileContext> { public Set<Integer> executableLines() { return executableLines; } }
MetricVisitor extends TreeVisitor<InputFileContext> { public Set<Integer> executableLines() { return executableLines; } MetricVisitor(FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter); }
MetricVisitor extends TreeVisitor<InputFileContext> { public Set<Integer> executableLines() { return executableLines; } MetricVisitor(FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter); static boolean isNosonarComment(Comment comment); Set<Integer> linesOfCode(); Set<Integer> commentLines(); Set<Integer> nosonarLines(); Set<Integer> executableLines(); int numberOfFunctions(); int numberOfClasses(); int cognitiveComplexity(); }
MetricVisitor extends TreeVisitor<InputFileContext> { public Set<Integer> executableLines() { return executableLines; } MetricVisitor(FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter); static boolean isNosonarComment(Comment comment); Set<Integer> linesOfCode(); Set<Integer> commentLines(); Set<Integer> nosonarLines(); Set<Integer> executableLines(); int numberOfFunctions(); int numberOfClasses(); int cognitiveComplexity(); static final String NOSONAR_PREFIX; }