12

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 ?

3 Answers 3

18

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.

Sign up to request clarification or add additional context in comments.

Comments

4

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

2 Comments

Can I have diff rule set for my local machine means can I disable some rules which are enable on remote server
Yes you can do an initial sync and then unchecked the rules in the Rules tab under SonarLint general settings
4

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

@java.lang.SuppressWarnings("java:S2699") 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.