checkstyle / sonar-checkstyle

Support on Checkstyle in SonarQube. Officially transfered from https://github.com/SonarQubeCommunity/sonar-checkstyle
GNU Lesser General Public License v3.0
171 stars 70 forks source link

Expand CircleCI's Sonar Test #443

Open rnveach opened 2 years ago

rnveach commented 2 years ago

Identified by @nrmancuso when discussing the CircleCI execution,

CircleCI is generating an empty checkstyle config when it does its test run:

# cat target/sonar/checkstyle.xml 
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"><!-- Generated by Sonar --><module name="Checker"><module name="SuppressWarningsFilter" /><module name="TreeWalker"><module name="SuppressWarningsHolder"/> <module name="SuppressionCommentFilter" /></module></module>

This makes sense since we are dealing with an blank sonar server in the run.

We should look into injecting some checks and expand to some real tests to ensure the plugin is working correctly.

rnveach commented 2 years ago

Just informational for some possibilities (from @nrmancuso ):

https://sonarqube.inria.fr/sonarqube/web_api/api/qualityprofiles

https://sonarqube.inria.fr/sonarqube/web_api/api/qualityprofiles/exporters https://sonarqube.inria.fr/sonarqube/web_api/api/qualityprofiles/importers https://sonarqube.inria.fr/sonarqube/web_api/api/qualityprofiles/restore

Maybe export an already configured server, save it to repo, and then restore it in CI.