diff --git a/README.md b/README.md index 3f60e55010..dfe4e41f76 100644 --- a/README.md +++ b/README.md @@ -132,3 +132,31 @@ both Maven Central and JCenter. $ ./gradlew release ``` +#### Running SonarQube (version 8.1) locally + +First you need to have Java (Oracle JRE 11 or OpenJDK 11) installed on your machine. + +Then download SonarQube community edition from this link: https://www.sonarqube.org/downloads/ + +Go to the conf folder of your sonarqube installation and edit the following line in wrapper.conf file with this: + +`wrapper.java.command=\Java\jdk-11.0.6\bin\java` + +Go to the following location where your SonarQube is installed: + +`/sonarqube-8.1.0.31237\bin\windows-x86-64` + +Open the command line and do this to start the SonarQube server: + +`.\StartSonar.bat` + +Open a browser and go to http://localhost:9000 + +Login with admin as username and password respectively. + +Make a project by clicking the + and call it fitnesse. + +Now that you've made a project. Open the command line and go to the root of the Java FitNesse project and do this for a code analyse: +`./gradlew sonarqube -x test` + +The -x test means not to run the unit test otherwise no code analyse will be done if there's a unit test failing. diff --git a/build.gradle b/build.gradle index 3edaf0cf02..49c518538e 100644 --- a/build.gradle +++ b/build.gradle @@ -24,6 +24,7 @@ plugins { id "maven-publish" id "com.jfrog.bintray" version "1.8.4" id "com.github.ben-manes.versions" version "0.27.0" + id "org.sonarqube" version "2.7" } apply plugin: "info.solidsoft.pitest"