SonarQube profile CSS, Java script

163 views
Skip to first unread message

Naveed P

unread,
Jul 6, 2017, 12:19:28 PM7/6/17
to SonarQube
Hi, 

I have a Jenkins job that get data from bitbucket/git repo creates a  build and sends report to Sonarqube.  This jobs has tons of CSS, XML, JAVA, JAVA Script and HTML, but final scan shows only Java analysis with one XML file scan and missing CSS, HTML, Java Script and rest of XML files.  I have also bypassed Jenkins and ran maven build locally to report to SonarQube with same results.  Did another test by adding sonar.project.properties with sonar.source=. and ran my build and it successfully shows up all profile scans for HTML, CSS, JAVA.

Has anyone had this issue or recommendation how to fix this ?


[INFO] Sensor Sonar-Sonargraph-Plugin [3.5] (done) | time=1ms
[INFO] Sensor SCM Sensor
[INFO] SCM provider for this project is: git
[INFO] 1 files to be analyzed
[INFO] 1/1 files analyzed
[INFO] Sensor SCM Sensor (done) | time=343ms
[INFO] Sensor Embedded CSS Analyzer Sensor
[INFO] 0 source files to be analyzed
[INFO] Sensor Embedded CSS Analyzer Sensor (done) | time=2ms
[INFO] 0/0 source files have been analyzed
[INFO] Sensor XmlFileSensor
[INFO] 1 source files to be analyzed
[INFO] Sensor XmlFileSensor (done) | time=58ms
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor
[INFO] Sensor XML Sensor (done) | time=11ms
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=0ms
[INFO] Sensor Code Colorizer Sensor
[INFO] Sensor Code Colorizer Sensor (done) | time=1ms
[INFO] Sensor CPD Block Indexer
[INFO] DefaultCpdBlockIndexer is used for xml
[INFO] Sensor CPD Block Indexer (done) | time=0ms


Thanks

G. Ann Campbell

unread,
Jul 7, 2017, 4:32:43 AM7/7/17
to SonarQube
Hi,

By default a Maven analysis isn't going to look at resources directories, but only at java files.

To override this behavior, reset the sonar.sources property.


Ann

np

unread,
Jul 7, 2017, 12:09:24 PM7/7/17
to SonarQube
Hi Ann, 

Thank you for you reply. Would this also work if we added the necessary files to be scanned within the pom.xml for CSS, HTML etc ? Or just use sonar.sources property file ?

Regards,
np

G. Ann Campbell

unread,
Jul 10, 2017, 2:25:32 AM7/10/17
to np, SonarQube
Hi,

I would just use sonar.sources.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/t_aXiIIEGvM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/de152575-b272-4b4b-a03f-c2e1aa0811e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages