Skip to content

Commit 3847e4a

Browse files
Fix QG
1 parent 978e493 commit 3847e4a

File tree

3 files changed

+53
-10
lines changed

3 files changed

+53
-10
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* SonarLint Core - Commons
3+
* Copyright (C) 2016-2025 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
@ParametersAreNonnullByDefault
21+
package org.sonarsource.sonarlint.core.commons.storage.model;
22+
23+
import javax.annotation.ParametersAreNonnullByDefault;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* SonarLint Core - Commons
3+
* Copyright (C) 2016-2025 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
@ParametersAreNonnullByDefault
21+
package org.sonarsource.sonarlint.core.commons.storage.repository;
22+
23+
import javax.annotation.ParametersAreNonnullByDefault;

backend/core/src/main/java/org/sonarsource/sonarlint/core/reporting/FindingReportingService.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
import org.sonarsource.sonarlint.core.rpc.protocol.client.issue.RaiseIssuesParams;
5959
import org.sonarsource.sonarlint.core.rpc.protocol.client.issue.RaisedFindingDto;
6060
import org.sonarsource.sonarlint.core.rpc.protocol.client.issue.RaisedIssueDto;
61-
import org.sonarsource.sonarlint.core.storage.StorageService;
6261
import org.sonarsource.sonarlint.core.tracking.TrackedIssue;
6362
import org.sonarsource.sonarlint.core.tracking.streaming.Alarm;
6463
import 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

Comments
 (0)