Javascript files are not analysingn in sonarqube 7.6


(Teswar) #1

HI,
I’m using sonarqube developer edition 7.6.
My project has module. In one module javascript files are not in “src”. java script files sources dir is different.
I tried to give module wise sonar.sources but looks like sonarqube is default taking sources as src.
I gave as example

property "sonar.modules", "module1,module2"
property "module1.sonar.sources", "src,jsfiles"
property "module2.sonar.sources", "src"

When I run analysis it is taking sources as src.
Any one help on this issue. Thanks in advance.


(G Ann Campbell) #2

Hi,

How are you performing analysis (with which scanner)? And how/where are you trying to set sonar.sources?

 
Ann


(Teswar) #3

I’m performing with gradle classpath “org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7”.

I’m trying to set sonar sources module wise.


(Teswar) #5

Can Anyone help on this issue.
In my project one of the module has javascript files. I’m trying to gave sonar.sources property module wise but sonarqube is not taking any module properties.
Initially I gave property sonar.modules=module1,module2
and
module1.sonar.sources=jsfilesdir.
Not working.


(Julien Henry) #6

Hi,

AFAIR the SonarScanner for Gradle doesn’t allow you to redefine module lists (using sonar.modules). You should instead override the configuration of sonar.sources in the right build.gradle of the module you want to change.


(Teswar) #11

So I can pass javascript source files path in sonar.sources. Plz Correct me if I’m wrong.


(Julien Henry) #12

Yes, sonar.sources is not limited to Java code.


(Teswar) #13

Sure Thanks Julien


(Teswar) #14

Is there any way can we publish Selenium reports to SonarQube server?


(Teswar) #15

Hi Julien,

I’m trying to publish selenium reports to SonarQube server. Is there any way can we publish selenium reports to sonar dashboard.

Thanks in advance


(G Ann Campbell) #16

Hi,

That’s a different topic that deserves a different thread. The short answer is ‘no’, not as such. If you want a long answer, please do open a new thread.

 
Ann


(Teswar) #17

Thanks Ann