Skip to content

Commit fc49be8

Browse files
committed
Added a test that exposes violations-lib/issues/#37.
See tomasbjerre/violations-lib#37
1 parent d2b05ad commit fc49be8

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/test/java/edu/hm/hafner/analysis/parser/violations/ErrorProneAdapterTest.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
package edu.hm.hafner.analysis.parser.violations;
22

3+
import org.junit.jupiter.api.Disabled;
4+
import org.junit.jupiter.api.Test;
5+
36
import edu.hm.hafner.analysis.AbstractParser;
47
import edu.hm.hafner.analysis.AbstractParserTest;
5-
import edu.hm.hafner.analysis.Report;
68
import edu.hm.hafner.analysis.Priority;
9+
import edu.hm.hafner.analysis.Report;
10+
import static edu.hm.hafner.analysis.assertj.Assertions.assertThat;
711
import edu.hm.hafner.analysis.assertj.SoftAssertions;
812

913
/**
@@ -35,4 +39,11 @@ protected void assertThatIssuesArePresent(final Report report, final SoftAsserti
3539
protected AbstractParser createParser() {
3640
return new ErrorProneAdapter();
3741
}
42+
43+
@Test @Disabled("See https://github.com/tomasbjerre/violations-lib/issues/37")
44+
void shouldProvideDetailsWhenParsingMavenLog() {
45+
Report report = parse("error-prone-maven.log");
46+
47+
assertThat(report).hasSize(1);
48+
}
3849
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[INFO] Compiling 143 source files to /Users/hafner/Development/jenkins/workspace/Model - Freestyle - New/target/classes
2+
[WARNING] /Users/hafner/Development/jenkins/workspace/Model - Freestyle - New/src/main/java/edu/hm/hafner/analysis/parser/RobocopyParser.java:[29,45] [StringSplitter] String.split(String) has surprising behavior
3+
(see http://errorprone.info/bugpattern/StringSplitter)
4+
Did you mean 'String file = matcher.group(4).split("\\s{11}", -1)[0];'?
5+
[INFO]
6+
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ analysis-model ---
7+
[INFO] Using 'UTF-8' encoding to copy filtered resources.

0 commit comments

Comments
 (0)