Chris Bolton
Chris Bolton

Reputation: 2314

Sonar javascript plugin issue

Currently, I am using the 1.3 javascript jar. In my code analysis, all the 3rd party files/folders are also being analyzed. I am thinking about upgrading to the new 2.1 javascript plugin. Will this fix the issue? I would like the sonar analysis to scan only the developers code and not the 3rd party code. Otherwise, the developer will just turn off the javascript analysis completely. I have looked at the release notes but did not find anything.

Upvotes: 0

Views: 313

Answers (2)

Mithfindel
Mithfindel

Reputation: 4708

You can setup exclusion patterns to prevent analysis of 3rd party libraries.

Upvotes: 2

Louis Barranqueiro
Louis Barranqueiro

Reputation: 10228

you have to define sources files with sonar.sources and files excluded with sonar.exclusions property. For example, in javascript :

sonar: {
    sources: ['app','assets'].join(','),
    exclusions: ['**/app/dependencies/**', '**/assets/bower_components/**']
}

Upvotes: 0

Related Questions