diff --git a/NOTICE.txt b/NOTICE.txt
index d15bd61df..bfa30d695 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -5,4 +5,6 @@ mailto:info AT sonarsource DOT com
This program is distributed with SonarQube analyzers that are subject to specific license terms.
-All of the analyzers distributed with this program are published under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA. For more details see https://sonarsource.com/license/ssal/
+The sonar-cfamily-plugin is a SonarQube analyzer published under the following proprietary license: SonarSource SA grants you a non-transferable, non-sublicensable, limited license to use the aforementioned plugins solely as part of this program. Any use, reproduction, distribution, or modification of the plugins outside the scope of this program is strictly prohibited.
+
+All of the other analyzers distributed with this program are published under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA. For more details see https://sonarsource.com/license/ssal/
diff --git a/README.md b/README.md
index 8866da232..1ec975e3c 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,7 @@ Normally, m2e will automatically suggest to install missing connectors (Tycho co
missing lifecycle mappings. This can all be done later.
1. Run `mvn clean verify -DskipTests` on the command line to fetch artifacts referenced in the parent pom
+ - for forks use `-Dskip-sonarsource-repo` as the reference to the CFamily analyzer is not available on Maven Central
2. In Eclipse, import the project root as a Maven project
3. In Eclipse, import the project root of the ITs as a Maven project and add them to the main project
4. Open `target-platforms/dev.target` with the target platform editor
@@ -69,6 +70,8 @@ With Maven:
mvn clean verify
+ - for forks use `-Dskip-sonarsource-repo` as the reference to the CFamily analyzer is not available on Maven Central
+
Running ITs
-----------
diff --git a/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java b/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java
index 42c9573cd..de50e0e41 100644
--- a/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java
+++ b/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java
@@ -126,7 +126,8 @@ public void defaultLinkVisibilityRoundTrip() {
public void open_rules_configuration() {
var ruleConfigurationPreferences = RuleConfigurationPreferences.open();
- assertThat(ruleConfigurationPreferences.getItems()).hasSize(9 /* CSS, HTML, Java, JavaScript, PHP, Python, Secrets, TypeScript, XML */);
+ /* C, C++, CSS, HTML, Java, JavaScript, PHP, Python, Secrets, TypeScript, XML */
+ assertThat(ruleConfigurationPreferences.getItems()).hasSize(11);
var cssNode = ruleConfigurationPreferences.getItems().get(0);
assertThat(cssNode.getText()).isEqualTo("CSS");
diff --git a/org.sonarlint.eclipse.core/pom.xml b/org.sonarlint.eclipse.core/pom.xml
index 9f956269c..7af0893f4 100644
--- a/org.sonarlint.eclipse.core/pom.xml
+++ b/org.sonarlint.eclipse.core/pom.xml
@@ -130,4 +130,49 @@
+
+
+
+
+ cfamily-analyzer
+
+
+ !skip-sonarsource-repo
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ copy-cfamily-analyzer
+ generate-resources
+
+ copy
+
+
+
+
+ com.sonarsource.cpp
+ sonar-cfamily-plugin
+ 6.61.0.77816
+ jar
+
+
+ ${project.basedir}/plugins
+ false
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/PluginPathHelper.java b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/PluginPathHelper.java
index 9cdda94fc..883dd783d 100644
--- a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/PluginPathHelper.java
+++ b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/PluginPathHelper.java
@@ -78,6 +78,11 @@ public static Path findEmbeddedXmlPlugin() {
return findEmbeddedPlugin("sonar-xml-plugin-*.jar", "Found XML plugin: ");
}
+ @Nullable
+ public static Path findEmbeddedCFamilyPlugin() {
+ return findEmbeddedPlugin("sonar-cfamily-plugin-*.jar", "Found CFamily plugin: ");
+ }
+
@Nullable
private static Path findEmbeddedPlugin(String pluginNamePattern, String logPrefix) {
var pluginEntriesEnum = SonarLintCorePlugin.getInstance().getBundle()
diff --git a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/SonarLintBackendService.java b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/SonarLintBackendService.java
index 83c2d72e9..7d3d8a297 100644
--- a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/SonarLintBackendService.java
+++ b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/backend/SonarLintBackendService.java
@@ -179,6 +179,7 @@ protected IStatus run(IProgressMonitor monitor) {
embeddedPlugins.put("web", requireNonNull(PluginPathHelper.findEmbeddedHtmlPlugin(), "HTML plugin not found"));
embeddedPlugins.put("xml", requireNonNull(PluginPathHelper.findEmbeddedXmlPlugin(), "XML plugin not found"));
embeddedPlugins.put("text", requireNonNull(PluginPathHelper.findEmbeddedSecretsPlugin(), "Secrets plugin not found"));
+ embeddedPlugins.put("cpp", requireNonNull(PluginPathHelper.findEmbeddedCFamilyPlugin(), "CFamily plugin not found"));
var sqConnections = ConnectionSynchronizer.buildSqConnectionDtos();
var scConnections = ConnectionSynchronizer.buildScConnectionDtos();
diff --git a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/SonarLintUtils.java b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/SonarLintUtils.java
index d11b617e6..76aaf58b1 100644
--- a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/SonarLintUtils.java
+++ b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/SonarLintUtils.java
@@ -56,12 +56,12 @@ public class SonarLintUtils {
*/
private static final Set DEFAULT_LANGUAGES = EnumSet.of(SonarLintLanguage.PYTHON, SonarLintLanguage.JS, SonarLintLanguage.TS,
SonarLintLanguage.HTML, SonarLintLanguage.CSS, SonarLintLanguage.PHP, SonarLintLanguage.XML, SonarLintLanguage.SECRETS);
- private static final Set OPTIONAL_LANGUAGES = EnumSet.of(SonarLintLanguage.JAVA, SonarLintLanguage.JSP);
+ private static final Set OPTIONAL_LANGUAGES = EnumSet.of(SonarLintLanguage.JAVA,
+ SonarLintLanguage.JSP, SonarLintLanguage.C, SonarLintLanguage.CPP);
private static final Set DEFAULT_CONNECTED_LANGUAGES = EnumSet.of(SonarLintLanguage.ABAP,
SonarLintLanguage.APEX, SonarLintLanguage.COBOL, SonarLintLanguage.JCL, SonarLintLanguage.KOTLIN,
SonarLintLanguage.PLI, SonarLintLanguage.PLSQL, SonarLintLanguage.RPG, SonarLintLanguage.RUBY,
SonarLintLanguage.SCALA, SonarLintLanguage.TSQL);
- private static final Set OPTIONAL_CONNECTED_LANGUAGES = EnumSet.of(SonarLintLanguage.C, SonarLintLanguage.CPP);
private SonarLintUtils() {
// utility class, forbidden constructor
@@ -119,12 +119,6 @@ public static Set getStandaloneEnabledLanguages() {
public static Set getConnectedEnabledLanguages() {
var enabledLanguages = EnumSet.noneOf(SonarLintLanguage.class);
enabledLanguages.addAll(DEFAULT_CONNECTED_LANGUAGES);
-
- var configurators = SonarLintExtensionTracker.getInstance().getAnalysisConfigurators();
- for (var configurator : configurators) {
- var enableLanguages = configurator.enableLanguages();
- enableLanguages.stream().filter(OPTIONAL_CONNECTED_LANGUAGES::contains).forEach(enabledLanguages::add);
- }
return enabledLanguages;
}