Skip to content

Commit

Permalink
Added a test that exposes violations-lib/issues/#37.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed May 15, 2018
1 parent d2b05ad commit fc49be8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package edu.hm.hafner.analysis.parser.violations;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import edu.hm.hafner.analysis.AbstractParser;
import edu.hm.hafner.analysis.AbstractParserTest;
import edu.hm.hafner.analysis.Report;
import edu.hm.hafner.analysis.Priority;
import edu.hm.hafner.analysis.Report;
import static edu.hm.hafner.analysis.assertj.Assertions.assertThat;
import edu.hm.hafner.analysis.assertj.SoftAssertions;

/**
Expand Down Expand Up @@ -35,4 +39,11 @@ protected void assertThatIssuesArePresent(final Report report, final SoftAsserti
protected AbstractParser createParser() {
return new ErrorProneAdapter();
}

@Test @Disabled("See https://github.com/tomasbjerre/violations-lib/issues/37")
void shouldProvideDetailsWhenParsingMavenLog() {
Report report = parse("error-prone-maven.log");

assertThat(report).hasSize(1);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[INFO] Compiling 143 source files to /Users/hafner/Development/jenkins/workspace/Model - Freestyle - New/target/classes
[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
(see http://errorprone.info/bugpattern/StringSplitter)
Did you mean 'String file = matcher.group(4).split("\\s{11}", -1)[0];'?
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ analysis-model ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.

0 comments on commit fc49be8

Please sign in to comment.