SonarLint and SonarQube LTS - rules aren't in sync

Hi,

Rules aren’t in sync between SonalLint and SonarQube LTS.

  • versions used

SonarLint 4.0 under IntellijIDEA 2018.2.5
SonarQube 6.7.1 LTS

  • error observed

Configuration:
Non-default quality profile with activated rule squid:S00116 (Field names should comply with a naming convention).
The rule activated with Major severity and customized pattern. That is, default values for the rule are set to “Minor” and “[1][a-zA-Z0-9]$", but for this profile they were changed to “Major” and "[2][A-Z][a-zA-Z0-9]$” after activation. The binding was updated after that change.

Error:

public class A {
    private String member;
}

Expected result: SonarLlink issue generated after running SonarLint analysis.
Actual result: No issues generated. No any log entries.

Actual log looks like this:

Clearing all issues because binding was updated
Project 'com.[censored]-6.0' in server binding 'Internal SQ' updated
Using configuration of 'com.[censored]-6.0' in server 'Internal SQ'
Analysing '[censored]IntegrationTest.java'...
Found 2 issues

Referenced issues are actual, but triggered by another rule. I expected to have 3 issues here.

Server-side analysis works fine in this changed rule for both methods (with publishing results to SQ server and without it)

  • steps to reproduce
  • Actiavte the rule in profile.
  • Change setting for activated rule
  • Update binding in IDEA
  • Run SonarLint analysis
  • potential workaround:
    Another review/approval iteration after running server-side analysis.

  1. a-z ↩︎

  2. f ↩︎

1 Like

Any news on that? No new version was released since Oct 2018 …

Hi @svf, are you from the same company as @petermbauer?

If yes, I think we can consider this is the same issue as Rules deactivated in SonarQube EE but SonarLint applies them (Eclipse plugin) (the quality profile is not correctly sync in SonarLint).

Works now for me with latest SonarLint an SonarQube 7.6 after setting the include folders in the Eclipse project as in SonarLint findings different from SonarQube server

thx,
Peter

No, it seems that these issues are different

To me the issue was that the source file was considered as a test file, so no issues reported by SonarLint.

Closing this thread due to lack of activity.

Feel free to open a new thread if you still have an issue/question.