Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kengotoda/sonarqube-rule-xml-generator
A maven plugin to generate sonarqube rule XML from findbugs.xml
https://github.com/kengotoda/sonarqube-rule-xml-generator
findbugs maven maven-plugin sonarqube sonarqube-plugin spotbugs
Last synced: 20 days ago
JSON representation
A maven plugin to generate sonarqube rule XML from findbugs.xml
- Host: GitHub
- URL: https://github.com/kengotoda/sonarqube-rule-xml-generator
- Owner: KengoTODA
- License: apache-2.0
- Created: 2017-06-14T12:54:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-24T21:12:59.000Z (over 3 years ago)
- Last Synced: 2024-11-02T00:42:06.754Z (2 months ago)
- Topics: findbugs, maven, maven-plugin, sonarqube, sonarqube-plugin, spotbugs
- Language: Java
- Size: 83 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SonarQube rule.xml generator
[![Build Status](https://travis-ci.com/KengoTODA/sonarqube-rule-xml-generator.svg?branch=master)](https://travis-ci.com/KengoTODA/sonarqube-rule-xml-generator)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=jp.skypencil.sonarqube%3Arule-xml-maven-plugin&metric=alert_status)](https://sonarcloud.io/dashboard?id=jp.skypencil.sonarqube%3Arule-xml-maven-plugin)This is a Maven plugin to generate `rule.xml` which is necessary to [create SonarQube plugin](https://docs.sonarqube.org/display/DEV/Build+Plugin).
## How to use
Create a multi module Maven project, which has a submodule for SpotBugs plugin and another submodule for SonarQube plugin.
In SonarQube plugin submodule, execute `generate` goal at `generate-resources` phase. For instance:
```xml
jp.skypencil.sonarqube
rule-xml-maven-plugin
0.1.2
../spotbugs-plugin/src/main/resources/findbugs.xml
../spotbugs-plugin/src/main/resources/messages.xml
${project.build.outputDirectory}/rule.xml
generate-resources
generate
```## Logic to decide severity
* If bug pattern's category is STYLE, MALICIOUS_CODE, I18N or EXPERIMENTAL, its severity is **INFO**
* Otherwise its severity is **MAJOR**## Logic to decide tag
* If bug pattern's category is PERFORMANCE, CORRECTNESS or MULTI-THREADING, it's tagged with **bug**
* You can specify comma-separated list of custom tag by `` parameter, e.g. `foo,bar`