Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
159
rated 0 times [  160] [ 1]  / answers: 1 / hits: 15702  / 12 Years ago, fri, august 31, 2012, 12:00:00

If you look at this site analysing JavaScript with Sonar you see that there are lots of errors reported on the JavaScript libraries.



http://nemo.sonarsource.org/drilldown/violations/jquery?rids%5B%5D=421365&severity=MAJOR



How can I prevent Sonar reporting the errors in the JavaScript libraries that I am using (since I can't fix any issues)?



At the same time, if I do manage to exclude the library, I don't want errors like undefined variables to appear in my files because they are referencing the JavaScript library.



If it makes any difference, I am using ExtJS 4.0.


More From » sonarqube

 Answers
26

I am using Maven and ExtJS 4.1 in my project. I have managed to run the analysis only on my source code by putting these lines in my pom.xml:



<properties>
<sonar.language>js</sonar.language>
<sonar.exclusions>extjs/**</sonar.exclusions>
</properties>

<build>
<sourceDirectory>src/main/webapp</sourceDirectory>
</build>


I don't know whether you're using Maven as well, but perhaps this will give you some hints.


[#83310] Thursday, August 30, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
neildrews

Total Points: 166
Total Questions: 103
Total Answers: 85

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
neildrews questions
Fri, Feb 18, 22, 00:00, 2 Years ago
Tue, Oct 12, 21, 00:00, 3 Years ago
Tue, Mar 23, 21, 00:00, 3 Years ago
Sun, Aug 16, 20, 00:00, 4 Years ago
;