SBel
SBel

Reputation: 3359

SonarQube sonar-runner doesn't exclude a file

I have created the sonar-project.properties file in the root of my project. Inside I have:

sonar.sources=WebContent/js
sonar.exclusions=file:/C:/work/frontend_common/WebContent/js/amp/adv3d/amp3d1Vendor.js

I have tried all the variations of sonar.exclusions that I could find and think of. Please find below the relevant log lines that demonstrate that this file is still included:

...
SonarQube Runner 2.4
...
07:30:42.340 INFO  - Excluded sources: 
07:30:42.340 INFO  -   file:/C:/work/frontend_common/WebContent/js/amp/adv3d/amp3d1Vendor.js
...
07:30:42.356 DEBUG - Language of file 'WebContent/js/amp/adv3d/amp3d1Vendor.js' is detected to be 'js'
...
07:30:42.605 WARN  - Invalid character encountered in file c:\work\frontend_common\WebContent\js\amp\adv3d\amp3d1Vendor.js at line 1139 for encoding windows-1252. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
...
07:30:42.668 INFO  - 58 files indexed
07:30:42.668 INFO  - 0 files ignored because of inclusion/exclusion patterns
...
Caused by: org.sonar.squidbridge.api.AnalysisException: Unable to parse file: c:\work\frontend_common\WebContent\js\amp\adv3d\amp3d1Vendor.js
...
Caused by: java.lang.OutOfMemoryError: Java heap space
...

Upvotes: 0

Views: 2618

Answers (1)

SBel
SBel

Reputation: 3359

I got it to work by using the pattern **/adv3d/**

Upvotes: 4

Related Questions