Skip to content

10.2.0.78029

Latest
Compare
Choose a tag to compare
@vojtech-suchy-sonarsource vojtech-suchy-sonarsource released this 22 May 10:31
· 34 commits to master since this release

API Changes

Breaking changes

  • org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientDelegate#didDetectSecret had no configScopeId parameter, it was added

New features

Analysis and tracking

  • Add the analyzeFilesAndTrack method to org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.AnalysisRpcService.

    • It allows clients to submit files for analysis, let the backend deal with issue tracking, and will lead to a later notification via raiseIssues and raiseHotspots (see below).
    • Usages of org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.AnalysisRpcService#analyzeFiles should be replaced by this new method.
    • It accepts a AnalyzeFilesAndTrackParams object instead of the deprecated AnalyzeFilesParams. The extra flag shouldFetchServerIssues should be set to true when the analysis is triggered in response to a file open event.
    • When using this method, implementation of the didRaiseIssue method of org.sonarsource.sonarlint.core.rpc.protocol.SonarLintRpcClient is no longer required. The new raiseIssues and raiseHotspots methods should be implemented instead (see below).
  • Add raiseIssues method to org.sonarsource.sonarlint.core.rpc.protocol.SonarLintRpcClient to report tracked issues.

    • Will be called by the backend when issues should be raised to the user. The UI should be updated accordingly.
    • The org.sonarsource.sonarlint.core.rpc.protocol.client.issue.RaiseIssuesParams class contains a list of issues to raise by file URI.
    • Each raised issue went through issue tracking, and has potentially been matched with a previously known issue and/or a server issue in connected mode.
    • This new method reports a collection of issues replacing the ones previously raised. Every call contains the full list of known issues.
  • Add raiseHotspots method to org.sonarsource.sonarlint.core.rpc.protocol.SonarLintRpcClient to report tracked Security Hotspots.

    • Will be called by the backend when hotspots should be raised to the user. The UI should be updated accordingly.
    • The org.sonarsource.sonarlint.core.rpc.protocol.client.issue.RaiseHotspotsParams class contains a list of hotspots to raise by file URI.
    • Each raised hotspot went through hotspot tracking, and has potentially been matched with a previously known hotspot and/or a server hotspot in connected mode.
    • This new method reports a collection of hotspots replacing the ones previously raised. Every call contains the full list of known hotspots.
  • Add getRawIssues method to org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.AnalyzeFilesResponse

    • It allows clients to get raised issues in the analysis response.
    • This method is temporarily added and will be removed when the deprecated APIs have been dropped.

Deprecation

  • org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.AnalysisRpcService#analyzeFiles and the underlying DTOs are deprecated, should be replaced by analyzeFilesAndTrack.
  • As a consequence, org.sonarsource.sonarlint.core.rpc.protocol.SonarLintRpcClient.didRaiseIssue and the underlying DTOs are now deprecated. It should be replaced by org.sonarsource.sonarlint.core.rpc.protocol.SonarLintRpcClient.raiseIssues and org.sonarsource.sonarlint.core.rpc.protocol.SonarLintRpcClient.raiseHotspots.
  • org.sonarsource.sonarlint.core.rpc.protocol.backend.tracking.IssueTrackingRpcService and the underlying DTOs are deprecated, the functionality is now handled by analyzeFilesAndTrack.
  • org.sonarsource.sonarlint.core.rpc.protocol.backend.tracking.SecurityHotspotMatchingRpcService and the underlying DTOs are deprecated, the functionality is now handled by analyzeFilesAndTrack.
  • org.sonarsource.sonarlint.core.client.legacy.analysis.SonarLintAnalysisEngine and all classes from the sonarlint-java-client-legacy module are now deprecated. Analysis should happen via org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.AnalysisRpcService#analyzeFilesAndTrack, and the sonarlint-java-client-legacy artifact will soon be removed.
  • The pid parameter of the org.sonarsource.sonarlint.core.rpc.protocol.backend.initialize.ClientConstantInfoDto constructor is not used anymore (the backend PID is used instead). The constructor is now deprecated, and a new constructor without this parameter was introduced and should be used. The org.sonarsource.sonarlint.core.rpc.protocol.backend.initialize.ClientConstantInfoDto.getPid method is not used anymore and also deprecated.

For full release notes, see JIRA