Skip to content

Commit

Permalink
Revert to SLCORE 4.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed Feb 3, 2021
1 parent f204d7b commit 0881db6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</issueManagement>

<properties>
<sonarlint.core.version>5.0.0.27065</sonarlint.core.version>
<sonarlint.core.version>4.15.1.27171</sonarlint.core.version>
<!-- analyzers used for tests -->
<sonar.java.version>6.5.0.22421</sonar.java.version>
<sonar.javascript.version>6.2.1.12157</sonar.javascript.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void fetch_server_issues_when_needed() throws IOException {
engine = mock(ConnectedSonarLintEngine.class);
tracker = newTracker(baseDir, engine);
matchAndTrack(tracker, "dummy", issues, true);
verify(engine).downloadServerIssues(any(), any(), any(), any());
verify(engine).downloadServerIssues(any(), any(), any());
verifyNoMoreInteractions(engine);
}

Expand Down Expand Up @@ -196,21 +196,21 @@ private ServerIssue mockServerIssue(Issue issue) {
// basic setup to prevent NPEs
when(serverIssue.creationDate()).thenReturn(Instant.ofEpochMilli(++counter));
when(serverIssue.resolution()).thenReturn("");
when(serverIssue.lineHash()).thenReturn("dummy checksum " + (++counter));
when(serverIssue.checksum()).thenReturn("dummy checksum " + (++counter));

// if issue itself is a mock, need to extract value to variable first
// as Mockito doesn't handle nested mocking inside mocking

String message = issue.getMessage();
when(serverIssue.getMessage()).thenReturn(message);
when(serverIssue.message()).thenReturn(message);

// copy fields to match during tracking

String ruleKey = issue.getRuleKey();
when(serverIssue.ruleKey()).thenReturn(ruleKey);

Integer startLine = issue.getStartLine();
when(serverIssue.getStartLine()).thenReturn(startLine);
when(serverIssue.line()).thenReturn(startLine);

return serverIssue;
}
Expand Down

0 comments on commit 0881db6

Please sign in to comment.