Skip to content

Commit

Permalink
SONARJAVA-1272 Disable secondary location test and remove it from api…
Browse files Browse the repository at this point in the history
…docs
  • Loading branch information
mpaladin committed Oct 2, 2015
1 parent adc87ba commit 3414687
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
* <li>endLine: relative endLine where the highlight ends (i.e. +1), same line if omitted</li>
* <li>endColumn: column where the highlight ends</li>
* <li>effortToFix: the cost to fix as integer</li>
* <li>secondary: a comma separated list of integers identifying the lines of secondary locations if any</li>
* </ul>
*/
@Beta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,28 +212,6 @@ public void verify_should_fail_when_using_incorrect_endLine() throws IOException
}
}

@Test
public void verify_should_fail_when_using_incorrect_secondaryLocation() throws IOException {
IssuableSubscriptionVisitor visitor = new FakeVisitor().withDefaultIssues();
try {
JavaCheckVerifier.verify("src/test/files/JavaCheckVerifierIncorrectSecondaryLocation.java", visitor);
Fail.fail();
} catch (AssertionError e) {
assertThat(e).hasMessage("Secondary locations: expected: [] unexpected:[3]");
}
}

@Test
public void verify_should_fail_when_using_incorrect_secondaryLocation2() throws IOException {
IssuableSubscriptionVisitor visitor = new FakeVisitor().withDefaultIssues();
try {
JavaCheckVerifier.verify("src/test/files/JavaCheckVerifierIncorrectSecondaryLocation2.java", visitor);
Fail.fail();
} catch (AssertionError e) {
assertThat(e).hasMessage("Secondary locations: expected: [5] unexpected:[]");
}
}

private static class FakeVisitor extends IssuableSubscriptionVisitor {

Multimap<Integer, String> issues = LinkedListMultimap.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public void addIssue(File file, JavaCheck check, int line, String message) {

/**
*
* FIXME(mpaladin) DO NOT GO ON RELEASE WITH THIS CONSTANT SET TO TRUE
* DO NOT GO ON RELEASE WITH THIS CONSTANT SET TO TRUE
*
* **/
private static final boolean ENABLE_NEW_APIS = false;
Expand Down

0 comments on commit 3414687

Please sign in to comment.