Giter VIP home page Giter VIP logo

sonarqube-rule-xml-generator's Introduction

SonarQube rule.xml generator

Build Status Quality Gate

This is a Maven plugin to generate rule.xml which is necessary to create SonarQube 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:

      <plugin>
        <groupId>jp.skypencil.sonarqube</groupId>
        <artifactId>rule-xml-maven-plugin</artifactId>
        <version>0.1.2</version>
        <configuration>
          <findbugs>../spotbugs-plugin/src/main/resources/findbugs.xml</findbugs>
          <messages>../spotbugs-plugin/src/main/resources/messages.xml</messages>
          <output>${project.build.outputDirectory}/rule.xml</output>
        </configuration>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

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 <tags> parameter, e.g. <tags>foo,bar</tags>

sonarqube-rule-xml-generator's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar kengotoda avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

halo-plugin

sonarqube-rule-xml-generator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.