Mike Van
Mike Van

Reputation: 1058

sonar-maven3-plugin to analyze a multi-language project using a customer checkstyle file

My project has a .checkstyle file created using Eclipse that references a checkstyle file held at a svn url. Below is an example of how the file is referencing the external URL:

  <local-check-config name="My Checkstyle" location="https://svn.me.com/viewvc/dev-Standards/trunk/Checkstyle/My%20Checkstyle.xml" type="remote" description="">
    <additional-data name="cache-file" value="false"/>
  </local-check-config>

This file also identifies a number of other checkstyle configuration file types for different file types.

Is there a way to pass this file into the sonar-maven3-plugin as a parameter? here is how I'm currently calling Sonar: mvn install org.codehaus.sonar:sonar-maven3-plugin:3.5-RC4:sonar

The .checkstyle file is located at the root of the project, at the same level as the pom.xml.

Upvotes: 0

Views: 228

Answers (1)

ziesemer
ziesemer

Reputation: 28707

Please refer to http://docs.sonarqube.org/display/SONAR/Quality+profiles - specifically, "Creating Profile".

Basically, under Settings, "Quality Profiles", "Java Profiles", click "Create". The next dialog will include an option for providing a Checkstyle configuration file populate the new quality profile with. (Provide it with the My%20Checkstyle.xml - not the .checkstyle file, which is specific to eclipse-cs.)

Upvotes: 2

Related Questions