Exclude JavaScript libraries from Sonar

opticyclic picture opticyclic · Aug 31, 2012 · Viewed 13.3k times · Source

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.

Answer

Renzo Robles picture Renzo Robles · Sep 13, 2016

You can add the library as a source file exclusion inside of Analysis Scope configuration, and you should use some willcards to help you.

enter image description here