Skip to content

Commit

Permalink
SLE-1047: Delete deprecated EP and config entry (#799)
Browse files Browse the repository at this point in the history
The EP was deprecated long ago and is not used, not even by IBM in their own integration.

The configuration for `moduleKey` can now also be removed as updating from SLE 3.7 to 11 is not possible anyway. Remove its unit test as well.
  • Loading branch information
thahnen authored Jan 21, 2025
1 parent 8e561a1 commit 3a10fa3
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 349 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
import static org.assertj.core.api.Assertions.assertThat;

public class SonarLintProjectConfigurationManagerTest extends SonarTestCase {

private static final String PROJECT_WITH_DEPRECATED_SETTINGS = "DeprecatedModuleBinding";
private final List<String> infos = new ArrayList<>();
private final List<String> errors = new ArrayList<>();

Expand Down Expand Up @@ -65,15 +63,6 @@ public void traceIdeMessage(@Nullable String msg) {
});
}

@Test
public void load_deprecated_project_config() throws IOException, CoreException, InterruptedException {
var project = importEclipseProject(PROJECT_WITH_DEPRECATED_SETTINGS);
// Configure the project
var configuration = SonarLintCorePlugin.getInstance().getProjectConfigManager().load(new ProjectScope(project), PROJECT_WITH_DEPRECATED_SETTINGS);
assertThat(configuration.getProjectBinding()).isEmpty();
assertThat(infos).contains("Binding configuration of project '" + PROJECT_WITH_DEPRECATED_SETTINGS + "' is outdated. Please rebind this project.");
}

@Test
public void settings_are_written_to_disk() throws IOException, CoreException, InterruptedException {
var project = importEclipseProject("SimpleProject");
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion org.sonarlint.eclipse.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Bundle-Vendor: %bundle_vendor
Bundle-Localization: OSGI-INF/l10n/bundle
Export-Package: org.sonarlint.eclipse.core,
org.sonarlint.eclipse.core.analysis,
org.sonarlint.eclipse.core.configurator,
org.sonarlint.eclipse.core.documentation,
org.sonarlint.eclipse.core.internal;x-friends:="org.sonarlint.eclipse.core.tests,org.sonarlint.eclipse.ui",
org.sonarlint.eclipse.core.internal.adapter;x-friends:="org.sonarlint.eclipse.ui",
Expand Down
1 change: 0 additions & 1 deletion org.sonarlint.eclipse.core/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension-point id="projectConfigurators" name="Project Configurators" schema="schema/projectConfigurators.exsd"/>
<extension-point id="projectsProvider" name="SonarLint Projects Provider" schema="schema/projectsProvider.exsd"/>
<extension-point id="fileAdapterParticipant" name="SonarLint File Adapter Participant" schema="schema/fileAdapterParticipant.exsd"/>
<extension-point id="projectAdapterParticipant" name="SonarLint Project Adapter Participant" schema="schema/projectAdapterParticipant.exsd"/>
Expand Down
78 changes: 0 additions & 78 deletions org.sonarlint.eclipse.core/schema/projectConfigurators.exsd

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.sonarlint.eclipse.core.analysis.IAnalysisConfigurator;
import org.sonarlint.eclipse.core.analysis.IFileLanguageProvider;
import org.sonarlint.eclipse.core.analysis.IFileTypeProvider;
import org.sonarlint.eclipse.core.configurator.ProjectConfigurator;
import org.sonarlint.eclipse.core.resource.IProjectScopeProvider;
import org.sonarlint.eclipse.core.resource.ISonarLintFileAdapterParticipant;
import org.sonarlint.eclipse.core.resource.ISonarLintProjectAdapterParticipant;
Expand All @@ -35,7 +34,6 @@ public class SonarLintExtensionTracker extends AbstractSonarLintExtensionTracker

private static SonarLintExtensionTracker singleInstance = null;

private final SonarLintEP<ProjectConfigurator> configuratorEp = new SonarLintEP<>("org.sonarlint.eclipse.core.projectConfigurators"); //$NON-NLS-1$
private final SonarLintEP<IAnalysisConfigurator> analysisEp = new SonarLintEP<>("org.sonarlint.eclipse.core.analysisConfigurator"); //$NON-NLS-1$
private final SonarLintEP<ISonarLintProjectsProvider> projectsProviderEp = new SonarLintEP<>("org.sonarlint.eclipse.core.projectsProvider"); //$NON-NLS-1$
private final SonarLintEP<ISonarLintFileAdapterParticipant> fileAdapterParticipantEp = new SonarLintEP<>("org.sonarlint.eclipse.core.fileAdapterParticipant"); //$NON-NLS-1$
Expand All @@ -48,7 +46,7 @@ public class SonarLintExtensionTracker extends AbstractSonarLintExtensionTracker
private final SonarLintEP<IProjectScopeProvider> projectScopeProviderEP = new SonarLintEP<>(
"org.sonarlint.eclipse.core.projectScopeProvider"); //$NON-NLS-1$

private final Collection<SonarLintEP<?>> allEps = List.of(configuratorEp, analysisEp, projectsProviderEp,
private final Collection<SonarLintEP<?>> allEps = List.of(analysisEp, projectsProviderEp,
fileAdapterParticipantEp, projectAdapterParticipantEp, languageEp, typeEp, projectHierarchyProviderEP,
projectScopeProviderEP);

Expand All @@ -69,10 +67,6 @@ public static void close() {
}
}

public Collection<ProjectConfigurator> getConfigurators() {
return configuratorEp.getInstances();
}

public Collection<IAnalysisConfigurator> getAnalysisConfigurators() {
return analysisEp.getInstances();
}
Expand Down
Loading

0 comments on commit 3a10fa3

Please sign in to comment.