Questions tagged [sonarlint]

SonarLint is an extension to IDEs (such as VS, Eclipse or IntelliJ) that provides on-the-fly feedback to developers on new bugs and quality issues found in their code, using Static Code Analysis.

SonarLint is an extension to IDEs (such as VS, VS Code, Eclipse, PyCharm, etc) that provides on-the-fly feedback to developers on new bugs and quality issues found in their code, using Static Code Analysis.

© 2008-2018, SonarSource S.A, Switzerland

Currently available:

693 questions
-1
votes
2 answers

Unused method parameters should be removed (squid:S1172) false positive using lambda

I have a working method that uses parameter as a lambda expression private BiConsumer, Properties> handleList(Properties p) { return (list, prop) -> executeSubList(list, prop); } For p I'm getting a false positive warning from…
Ori Marko
  • 56,308
  • 23
  • 131
  • 233
-1
votes
1 answer

How to avoid SonarLint UnusedPrivateMethod when instantiating Spring components?

In a basic Spring Boot app I have this component: @Component public class TheComponent { public String getKey() {return "value";} } used by a service. If I design my service like this: @Service public class TheService { @Autowired …
ThCollignon
  • 976
  • 3
  • 14
  • 31
-1
votes
1 answer

add new rules in sonarQube

I want to add new rule in sonarQube, so when I enter with an administrator profile I can’t find this button. My sonar version is sonarqube-Community-7.6. User : admin Password : admin And the URL is : http://localhost:9000/coding_rules There is…
-1
votes
1 answer

How to reduce number of if's in custom deserializer

I analyzed my custom JSON deserializer with SonarLint and it says that I should reduce Cognitive Complexitiy from 21 to at least 15. In other words it means that I have to much of if statements. My deserializer looks like this: @Override …
a4dev92
  • 531
  • 6
  • 15
-1
votes
1 answer

Can SonarLint scan the as and mxml files of Flex?

I use SonarLint with connected mode with my sonarQube instance, I installed the flex plugin, here is a picuture : I synchronized my Sonarlint Server but I can't have detail of the analysis. I right click on my as/mxml files> SonarLint > Analysis ,…
Mahmoud
  • 325
  • 10
  • 25
-1
votes
1 answer

SonarLint and "common-java" analyzers

Using Sonar 6.7 with SonarLint in InteliJ the rule "Source files should have a sufficient density of comment lines" pops-up during Sonar analysis. But since this is not a Sonar rule ("squid:") but a "common-java" then SonarLint won't report it. Is…
user1622058
  • 453
  • 3
  • 7
  • 16
-1
votes
1 answer

SonarLint Binding Project Count Error since Version 2.8.0.214

I have the same problems as the user on the page SonarLint Binding Error since Version 2.8.0.214 - Project Count out of Range?. On your Jira board I found the ticket https://jira.sonarsource.com/browse/SVS-123 that bug will be fixed in the version…
-1
votes
1 answer

Sonarlint automatic triggering is always off?

Current using version 2.3.1 of the sonarlint plugin on Intellij IDEA 2016.2.3. Connected to a remote sonar server. This may be a known bug, but I can't seem to get the automatically triggered analysis to work. I click the checkbox and save the…
-1
votes
1 answer

How to see issues assigned to user using sonlint?

I was able to see this in older sonar plugin but not sure if sonar-lint supports it. Please help.
user3346347
  • 75
  • 1
  • 5
-2
votes
1 answer

In Java 11, how do you get a sonarLint warning-free way of getting an index?

I'm using Java 11 and SonarLint. I have this code for getting a random index in a string (SALTCHARS is a string of length 36) int index = (int) (rnd.nextFloat() * SALTCHARS.length()); However, using SonarLint, this generates this warning I…
Dave
  • 15,639
  • 133
  • 442
  • 830
-2
votes
4 answers

Merge this if statement with the enclosing one in sonar

Why Sonar showing below code having Major issue and its saying Marge this if statement with enclosing one If i do that there will be functional issue will come .How can i solve this problem code if…
Krish
  • 4,166
  • 11
  • 58
  • 110
-2
votes
1 answer

Adding elements to an empty ArrayList

I am adding objects to an ArrayList that is initialized as null inside a for each loop, but SonarLint is giving me a "NullPointerException" could be thrown when I try to add each object. Why is this error being pointed out? public…
Emma Barrett
  • 83
  • 1
  • 10
-2
votes
1 answer

How to solve this "Synchronize on a new "Object" instead. "

I am getting the warning in sonar at line synchronized (new Integer(count)) as Synchronize on a new "Object" instead. public class PRMDataTransferHelper { /** static variable to keep count */ private static int count = 0; private…
user3156272
  • 23
  • 1
  • 5
-2
votes
2 answers

Android lint shows up no issues in Sonarqube

I have setup my project to use with Sonarqube. I was using PMD and Checkstyle to run tests and all of them are successfully logged in Sonarqube console. But last day I decided to add Android lint rules also to my Quality profile. I have activated…
Ajith M A
  • 3,838
  • 3
  • 32
  • 55
-2
votes
1 answer

Sonarlint CLI to report on new issues only

Further to this Sept 2016 posting: command line sonarlint show only new issues is there any work in progress on this much needed functionality to have the command line interface Sonarlint reporting on new issues only? The product is virtually…
ConorC
  • 1
  • 1
1 2 3
46
47