Closed tjhanley closed 2 years ago
we couldn’t find any APIs that could post a modified checkstyle xml file back into the quality profile. Can there be a solution for this possibly through newer API definitions?
plugin do not define any http API. Please ask this question at sonarqube forum. I would like to know answer too :). This is feature of sonarqube web service, not a checkstyle plugin.
creates the result xml from the run but does not show the same results in the UI as code smells/bugs.
interesting, but we need more details and exact steps to make sure we can reproduce this. Can you reproduce this on sonar docker image instance ? This is how we test each commit over sonar in docker - https://github.com/checkstyle/sonar-checkstyle/blob/master/wercker.yml#L19 . Can you do the same and your side over our plugin sources :), (just put tab some where in our code and try to do the same suppression configuration).
@tjhanley ping Can you provide the requested information or was your issue resolved?
closing this as stale issue. please reopen if you can provide further details and issue still persists.
Sonar version: Enterprise EditionVersion 7.3 (build 15553) Checkstyle sonar plugin version: 4.17
Steps to reproduce or description of problem:
My team has a couple of questions about this plugin.
This outputs content in xml format giving all the checker and tree walker filters associated. While it is currently possible to download the said check style rules xml based out of the plugin for checkstyle configured with sonar for a given quality profile, we couldn’t find any APIs that could post a modified checkstyle xml file back into the quality profile.
Can there be a solution for this possibly through newer API definitions?
sonar.checkstyle.filters
andsonar.checkstyle.treewalkerfilters
. Providing values to these arguments and running a sonar build does take the filters supplied at runtime, creates the result xml from the run but does not show the same results in the UI as code smells/bugs.Additional info here :
Temp quality profile assigned to Project A with no default rules. We are going to only provide one check style filter by passing it in through
-Dsonar.checkstyle.filters
through sonar Runner plugin configured with TeamCitya. When passing the filter argument with a test string : newline checker, we can see that sonar reads the argument and constructs the xml file internally at runtime under the
.sonar/checkstyle.xml
b. Content of
.sonar/checkstyle.xml
:d. The same results were not displayed on the project UI which had the rules executed
e. There are no
code smells
or any errors reported heref. NOTE: Above was executed using SonarQube Runner 2.4. The same behavior was also observed when the filter rules were set globally on the external analyzer level on Sonar directly