Support more than 10000 rules in SonarLint

eclipse
sonarlint

(Arend v. Reinersdorff) #1

Versions

  • SonarQube 7.1
  • SonarLint for Eclipse 3.6

Steps to reproduce

  1. Setup SonarQube server with more than 10000 rules
  • C (Community) and C++ (Community) have 3.9k rules each
  • Java has 1.8k rules
  • Add support for some languages with less rules to > 10000
  1. Sync SonarLint with SonarQube

Error observed
Sync fails with error message: “Found more than 10000 rules in the SonarQube server, which is not supported by SonarLint”.

Potential workarounds

  1. Remove some of the languages with less rules.
    In our case, only C, C++ and Java would end up at 9505 rules, with JavaScript and related languages at 9917 rules. This would probably work for us but would not leave much room for adding more rules in the future.
  2. Move C and C++ languages to a second SonarQube instance.
    Possible and would fix the problem, but more administration overhead.

Previous discussion

I think the main problem here is that C and C++ have more rules than expected by SonarQube.
Support for more than 10000 rules would be helpful. If complete support is not possible, maybe an option to select which rules to sync with SonarLint


(Nicolas Bontoux) #2

Hi,

That is a lot, certainly much more than what one would typically expect. In order to put things in context, I suggest you share the list of plugins installed on your SonarQube instance. You can obtain it from the System Info.


(Arend v. Reinersdorff) #3

Hi @NicoB,

here’s an extract from our System Info Json:

    {
	"Health": "GREEN",
	"Health Causes": [],
	"System": {
		"Server ID": "AWEJZ40808Qvwi2MgIgL",
		"Version": "7.1.0.11001",
		"External User Authentication": "LDAP",
		"High Availability": false,
		"Official Distribution": true,
		"Force authentication": true,
		"Home Dir": "/opt/sonar",
		"Data Dir": "/opt/sonar/data",
		"Temp Dir": "/opt/sonar/temp",
		"Processors": 32
	},
	"Plugins": {
		"css": "3.1 [CSS / SCSS / Less]",
		"python": "1.10.0.2131 [SonarPython]",
		"cxx": "1.1.0 [C++ (Community)]",
		"c": "1.1.0 [C (Community)]",
		"pmd": "2.6 [PMD]",
		"scmsvn": "1.7.0.1017 [Svn]",
		"javascript": "4.1.0.6085 [SonarJS]",
		"csharp": "7.2.0.5463 [SonarC#]",
		"findbugs": "3.7.0 [Findbugs]",
		"java": "5.4.0.14284 [SonarJava]",
		"groovy": "1.5 [Groovy]",
		"ldap": "2.2.0.608 [LDAP]",
		"web": "2.6.0.1053 [SonarWeb]",
		"xml": "1.5.1.1452 [SonarXML]",
		"flex": "2.4.0.1222 [SonarFlex]",
		"scmgit": "1.4.1.1128 [Git]",
		"php": "2.13.0.3107 [SonarPHP]",
		"typescript": "1.7.0.2893 [SonarTS]",
		"checkstyle": "4.10 [Checkstyle]"
	},

I assume the relevant rule count is the count in the “Rules” tab? Or is it maybe some other count?


(Arend v. Reinersdorff) #4

Hi,

I found the time to look into this further and found clearer steps to reproduce:

  1. Install current SonarQube LTS version 6.7.5
  2. Update all plugins => 1,849 rules
  3. Install Community C plugin ( sonar-c-plugin-x.y.z.jar)
  4. Install Community C++ plugin ( sonar-cxx-plugin-x.y.z.jar) => 9,599 rules
  5. Install Findbugs plugin => 10,484, SonarLint can no longer sync the rules

All Plugin versions:
“cxx”: “1.1.0 [C++ (Community)]”,
“python”: “1.10.0.2131 [SonarPython]”,
“c”: “1.1.0 [C (Community)]”,
“scmsvn”: “1.8.0.1168 [Svn]”,
“javascript”: “5.0.0.6962 [SonarJS]”,
“csharp”: “7.8.0.7320 [SonarC#]”,
“findbugs”: “3.8.0 [Findbugs]”,
“java”: “5.9.1.16423 [SonarJava]”,
“flex”: “2.4.0.1222 [SonarFlex]”,
“scmgit”: “1.4.1.1128 [Git]”,
“xml”: “1.5.1.1452 [SonarXML]”,
“php”: “2.15.0.4060 [SonarPHP]”,
“typescript”: “1.8.0.3332 [SonarTS]”


(Duarte Meneses) #7

Hi Arend,

Thanks for providing us the full details.
We are aware of this limitation and we plan to work on it for the next release of SonarLint: https://jira.sonarsource.com/browse/SLCORE-205


(Arend v. Reinersdorff) #8

Hi Duarte,

thanks for the link to the issue. Great to see that this is on your radar :slight_smile: