5858import org .sonarsource .sonarlint .core .rpc .protocol .client .issue .RaiseIssuesParams ;
5959import org .sonarsource .sonarlint .core .rpc .protocol .client .issue .RaisedFindingDto ;
6060import org .sonarsource .sonarlint .core .rpc .protocol .client .issue .RaisedIssueDto ;
61- import org .sonarsource .sonarlint .core .storage .StorageService ;
6261import org .sonarsource .sonarlint .core .tracking .TrackedIssue ;
6362import org .sonarsource .sonarlint .core .tracking .streaming .Alarm ;
6463import org .springframework .context .ApplicationEventPublisher ;
@@ -83,20 +82,18 @@ public class FindingReportingService {
8382 private final Map <String , Alarm > streamingTriggeringAlarmByConfigScopeId = new ConcurrentHashMap <>();
8483 private final Map <UUID , Set <URI >> filesPerAnalysis = new ConcurrentHashMap <>();
8584 private final ApplicationEventPublisher eventPublisher ;
86- private final StorageService storageService ;
8785 private final boolean isStreamingEnabled ;
8886 private final AiCodeFixService aiCodeFixService ;
8987
9088 public FindingReportingService (SonarLintRpcClient client , ConfigurationRepository configurationRepository , NewCodeService newCodeService , SeverityModeService severityModeService ,
91- PreviouslyRaisedFindingsRepository previouslyRaisedFindingsRepository , ApplicationEventPublisher eventPublisher , StorageService storageService ,
92- InitializeParams initializeParams , AiCodeFixService aiCodeFixService ) {
89+ PreviouslyRaisedFindingsRepository previouslyRaisedFindingsRepository , ApplicationEventPublisher eventPublisher , InitializeParams initializeParams ,
90+ AiCodeFixService aiCodeFixService ) {
9391 this .client = client ;
9492 this .configurationRepository = configurationRepository ;
9593 this .newCodeService = newCodeService ;
9694 this .severityModeService = severityModeService ;
9795 this .previouslyRaisedFindingsRepository = previouslyRaisedFindingsRepository ;
9896 this .eventPublisher = eventPublisher ;
99- this .storageService = storageService ;
10097 this .isStreamingEnabled = initializeParams .getBackendCapabilities ().contains (BackendCapability .ISSUE_STREAMING );
10198 this .aiCodeFixService = aiCodeFixService ;
10299 }
@@ -252,11 +249,11 @@ private static Map<URI, List<RaisedIssueDto>> getIssuesToRaise(Map<Path, List<Tr
252249 return updatedIssues .values ().stream ().flatMap (Collection ::stream )
253250 .collect (groupingBy (TrackedIssue ::getFileUri ,
254251 Collectors .mapping (issue -> toRaisedIssueDto (issue , newCodeDefinition , isMQRMode , aiCodeFixFeature .map (feature -> {
255- LOG .debug ("AiCodeFix is fixable: {}" , aiCodeFixFeature .get ().isFixable (issue ));
256- LOG .debug ("Supported rules: {}" , aiCodeFixFeature .get ().settings ().supportedRules ());
257- LOG .debug ("Issue ruleKey {} and text range {}" , issue .getRuleKey (), issue .getTextRangeWithHash ());
258- return feature .isFixable (issue );
259- }).orElse (false )),
252+ LOG .debug ("AiCodeFix is fixable: {}" , aiCodeFixFeature .get ().isFixable (issue ));
253+ LOG .debug ("Supported rules: {}" , aiCodeFixFeature .get ().settings ().supportedRules ());
254+ LOG .debug ("Issue ruleKey {} and text range {}" , issue .getRuleKey (), issue .getTextRangeWithHash ());
255+ return feature .isFixable (issue );
256+ }).orElse (false )),
260257 Collectors .toList ())));
261258 }
262259
0 commit comments