Questions tagged [sonar-plugin]

25 questions
0
votes
1 answer

Custom rule for multiple java classes

Can you please let me know if there is way to write a check when it spans across multiple java classes. For Example: we want to check if there is DB call made in loop, in the below example the call from first class is made to a second class. Can we…
sac4des
  • 1
  • 1
0
votes
2 answers

C/C++ Community Plugin Quality Rules shows Zero active

I am using SonarQube-6.7.7(LTS) and C/C++ Community Plugin [sonar-cxx-plugin-1.3.2.1853.jar] version. Under Quality Profiles for C++ (Community) active rules all shows zero. Snapshot given below. I have tried the following, However still i could…
user4948798
  • 1,924
  • 4
  • 43
  • 89
0
votes
1 answer

Sonarqube 7.9.1 is not starting up with sonar-crowd 2.1.3

We have upgraded sonarqube from 7.4 to 7.9.1 where we need to upgrade sonar-crowd plugin from 2.1.1 to 2.1.3. After the upgrade, sonar application is starting up as expected without Crowd config. But while starting up with crowd, it fails at the…
0
votes
1 answer

SonarQube. Custom repository with custom rules. Included rules is presented as Rule Template

It was necessity to write my own repository with a bunch of specific python rules and I wouldn't like to use Xpath to include it in sonar context. I've implemented my own module where I used almost the same implementation from sonar-python modules:…
Vladimir Topolev
  • 397
  • 3
  • 21
0
votes
1 answer

SonarQube version <-> SonarJava version <-> Custom Plugin

I'm trying to implement a custom SonarQube plugin which also works fine on my dev machine in Eclipse, but as soon as I deploy it to our SonarQube instance it crashes during runtime with a ClassNotFoundException. The class which it can't find during…
user3032769
  • 21
  • 1
  • 4
0
votes
1 answer

SonarQube fails on comment % while calculated ratio is >26%

I have been using sonar for over 4 years for Java projects we have created. Currently, we want to fail the build if some metrics cannot be met. Thus, I installed Build Breaker plugin and re-run the build cycle, without any issue. Then I modified…
0
votes
1 answer

Do I need to add dependencies for custom rule for SonarJava analyzer in SonarQube?

I wrote a custom plugin which scans for a method from javax.servlet.http.HttpServletRequest. For running test cases the dependency can be added in copy execution in pom.xml file. After adding the test cases passed for the rule. But when the…
Manoj Kumar
  • 289
  • 4
  • 12
0
votes
1 answer

Multiple issues in a single line sonar plugin maven test

I'm coding a custom rule for a Java. There are two Tree.KIND instances (STRING_LITERAL and ASSIGNMENT) to be captured. There is a particular line where both the logic of String Literal and Assignment throws an issue. But sonar test throws error…
Manoj Kumar
  • 289
  • 4
  • 12
0
votes
2 answers

Still facing squid:S2095 in Sonar / How to upgrade SonarJava in Sonarqube

I freshly installed the newest version of Sonarqube and ran the inspection. I got warnings regarding squid:S2095 (closing of streams) which are false positives and which should be fixed with version 3.14 of SonarJava (see…
IwantToKnow
  • 351
  • 1
  • 5
  • 18
0
votes
1 answer

"Exception caught while parsing Xanitizer XML report file" : ParserConfigurationException occurs while running SonarQube Scanner for Ant Task

I'm trying to setup SonarQube with Xanitizer on my local machine so that the findings of the last generated Security Findings XML, get picked up by the SonarQube Plugin for Xanitizer so that it can display the results on the SonarQube server. The…
Anurag
  • 367
  • 1
  • 2
  • 15
1
2