We have a pretty standard web project using Java, which contains also some javascript code in the standard src/main/webapp
folder. We are using Gradle 2.14 as our build tool.
We have just installed a brand new Sonarqube 6.0.1 on a fresh server, checked that both the Java and Javascript plugins are installed, and modified the build.gradle file as recommended on the Sonarqube documentation:
plugins {
id 'org.sonarqube' version '2.0.1'
}
sonarqube {
properties {
property 'sonar.projectName', 'Our-Project'
property 'sonar.projectKey', 'com.ourcompany:our-project'
}
}
This doesn't work as expected: the java code is analyzed correctly and we can browse the results on sonar, but the javascript code isn't analyzed.
What are we doing wrong? Thanks.
login property in your command line or you configure it as part of your gradle. properties file. Execute gradle sonarqube -Dsonar. login=yourAuthenticationToken and wait until the build has completed, then open the web page indicated at the bottom of the console output.
For Android projects, Google have made Gradle the de facto build tool. It's getting a name for its flexibility, so when the opportunity came to build a single page Javascript webapp we decided to put the latest addition to the polyglot build tool arsenal through its paces.
Feature 1: Multi-Language Support. By default, SonarQube supports 27 programming languages. These include Java, JavaScript, C#, Python, Golang, HTML5, CSS3, PL/SQL, and many more.
SonarQube is an open source quality management platform, designed to analyze and measure your code's technical quality. It is used to test code written in the main programming languages such as C/C++, JavaScript, Java, C#, PHP, and Python, and even a combination of several languages simultaneously.
I have managed to fix our issues by adding this property inside the sonarqube
block:
property 'sonar.sources', 'src/main'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With