11

I have SonarLint installed in Eclipse and there is a remotely set up sonarQube server, but rules are different on both . How can I configure rules same as SonarQube on SonarLint in my Eclipse ?

benzonico
  • 10,635
  • 5
  • 42
  • 50
Nishant Modi
  • 669
  • 1
  • 6
  • 19

3 Answers3

17

I thought I would leave this up here for anyone looking.....

To Disable/Re-Enable Rules in SonarLint/Eclipse. -Window-Preferences-SonarLint-Rules Configuration. -Select Your Language(in my case Java). -Select the drop for changed rules or open the + symbol to show all rules.

kelevra88
  • 1,532
  • 3
  • 17
  • 25
4

In your Java code, you can disable a specific rule for a single method using annotations:

@java.lang.SuppressWarnings("java:S2699") 
David Medinets
  • 5,160
  • 3
  • 29
  • 42
3

You want to use the connected mode in order to apply the same ruleset on your IDE that the one running on your SonarQube instance. Have a look at the relevant documentation : http://www.sonarlint.org/eclipse/#Connected

benzonico
  • 10,635
  • 5
  • 42
  • 50