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
16
votes
5 answers

Unable to trigger SonarLint Analysis on whole Project

I have installed the latest sonarLint plugins with Intellij 2016.1.2. Analyze on the fly works fine. However, I can't find in the IntelliJ "Analyze" tab any "Analyze with SonarLint". In the SonarLint window>issues tab, I can only see scope "current…
Claude Libois
  • 183
  • 1
  • 1
  • 7
15
votes
2 answers

Calling @Transactional method from non-transactional method in Spring 4.3

I have the following code: @Service public class ItemService { ... public void addItems(@Nonnull DocumentDTO dto) throws Exception { // some code that takes some time to process ... addItems(dto.getDocId(), items); …
serg kunz
  • 505
  • 1
  • 4
  • 9
14
votes
0 answers

Error S3925 : Update this implementation of 'ISerializable' to conform to the recommended serialization pattern

I have the following code written in c#. Since I upgraded the package NuGet SonarAnalyzer.CSharp to the version 6.0.0.2033, I've got this error : Error S3925 Update this implementation of 'ISerializable' to conform to the recommended serialization…
Arnaud Viguier
  • 141
  • 1
  • 1
  • 3
14
votes
4 answers

How to install an older Eclipse plugin of SonarLint

Currently in the Eclipse Marketplace SonarLint is only available in the latest version (2.5.1). For a compatibility reason I need to have version (2.2.1). How can i install an older version of my choice?
The Digital Ad Venture
  • 1,576
  • 1
  • 16
  • 24
13
votes
3 answers

SonarLint best practice for "hard coded password" false positives

SonarLint flags as blockers some variables in my code base. Ones like public static final String INVALID_PASSWORD = "Your password is invalid."; SonarLint thinks that the variable might contain a hard coded password, which is a security risk. But in…
Tim
  • 4,999
  • 3
  • 24
  • 29
12
votes
3 answers

SonarLint is not showing all records compared to referenced SonarQube server

We are using SonarQube server version 5.3 with SonarLint 2.0 in connected mode. As an IDE we use Eclipse Mars 2.0 and when we compare results found by SonarQube server with results found by SonarLint within IDE, the results differ (example file 274…
Uhla
  • 368
  • 3
  • 11
11
votes
4 answers

Error using SonarLint in Visual Studio Code (VsCode) and Java 11

I have a problem using SonarLint in visual studio code, I’ve been using very well this plugin in java 8 but arround last week, Vscode required java 11 as minimum java version and when I updated this (I keep using java 8 for my project, according to…
chavalife17
  • 162
  • 1
  • 2
  • 10
11
votes
0 answers

Run SonarCloud in Visual Studio Code on entire project structure

I'm using SonarCloud to maintain/improve the code quality of our Angular5 application. I installed the SonarCloud plugin in VSC and it shows its warnings/problems as soon as I open a TypeScript file, if any found. So far, so good. Unfortunately,…
11
votes
1 answer

Java - SonarQube, issue on 'Utility classes should not have public constructors' (squid:S1118) in singleton

I am performing static code analysis on old code using a SonarLint analysis. I cannot paste the code here but it is similar to: @SuppressWarnings("static-access") public class SuperClass { private SuperClass() { } public static…
Tester
  • 173
  • 1
  • 10
11
votes
2 answers

SonarLint doesn't see server binding

IntelliJ IDEA -> Settings -> Other settings -> SonarLint General Settings SonarQube servers: Localhost (http://localhost:9000; login: admin; password: admin; test connection - "Authentification successful") Update binding: few seconds…
Katoteshi Fuku
  • 123
  • 1
  • 1
  • 11
11
votes
3 answers

How to enable/disable any rule from SonarLint in Eclipse

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 ?
Nishant Modi
  • 669
  • 1
  • 6
  • 19
11
votes
3 answers

How to exclude JS files from on-the-fly analysis in SonarLint for IntelliJ IDEA?

I can't figure out, how to exclude specific source files from being analysed by SonarLint on the fly. The FAQ suggest to configure the property sonar.exclusions. But SonarLint keeps analysing excluded files when they get opened in IntelliJ.…
Thojo
  • 406
  • 4
  • 7
11
votes
5 answers

Not able to install sonarlint plugin in Platform: Eclipse Mars.1 (4.5.1)

Trying to install sonar lint plugin in STS tool, it is not installing and says Sonar lint not compatible with this version of eclipse. Find the versions details. Spring Tool Suite Version: 3.7.2.RELEASE Build Id: 201511261048 Platform: Eclipse…
Mohankumar Rathinam
  • 623
  • 1
  • 11
  • 25
10
votes
3 answers

Sonar - Make DATE_FORMAT as instance variable

I have a rest web service, and below is how i have declared DateFormat as this is the date format i am going to use application wide. When i did code analysis using SonarLint eclipse plug-in, i got major warning saying "Make DATE_FORMAT as instance…
Jigar Naik
  • 1,946
  • 5
  • 29
  • 60
10
votes
1 answer

Package names should comply with a naming convention (squid:S00120) and underscore

SonarLint produces an error: Package names should comply with a naming convention (squid:S00120) ... With the default regular expression ^[a-z]+(\.[a-z][a-z0-9]*)*$. However the JLS allows and even recommends using the underscore. Clause 6.1.…
Jonathan Rosenne
  • 2,159
  • 17
  • 27
1
2
3
46 47