GithubHelp home page GithubHelp logo

mohanaraosv / sonar-pmd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jborgers/sonar-pmd

0.0 0.0 0.0 4.06 MB

☕️ PMD Plugin for SonarQube

Home Page: https://redirect.sonarsource.com/plugins/pmd.html

License: GNU Lesser General Public License v3.0

Java 66.38% HTML 33.39% Shell 0.23%

sonar-pmd's Introduction

SonarQube PMD Plugin Maven Central Build Status SonarStatus SonarStatus

Sonar-PMD is a plugin that provides coding rules from PMD for use in SonarQube.

Starting April 2022, the project has found a new home. We, jborgers and stokpop, aim to provide an active project and well-maintained sonar-pmd plugin. It is now sponsored by Rabobank.

For a list of all rules and their status, see: RULES.md

Installation

The plugin should be available in the SonarQube marketplace and is preferably installed from within SonarQube (Administration --> Marketplace --> Search pmd).

Because of changed integration of the Java-plugin in SonarQube and our dependency on it, this plugin is temporarily not available from the Marketplace. Hopefully this will be fixed quickly with the upcoming release of version 3.4.0. Alternatively, download the latest JAR file, put it into the plugin directory (./extensions/plugins) and restart SonarQube.

Usage

Usage should be straight forward:

  1. Activate some PMD rules in your quality profile.
  2. Run an analysis.

Java version

Sonar-PMD analyzes the given source code with the Java source version defined in your Gradle or Maven project. In case you are not using one of these build tools, or if that does not match the version you are using, set the sonar.java.source property to tell PMD which version of Java your source code complies to.

Possible values : 1.4 to 1.8/8 to 18

Table of supported versions

PMD Plugin 2.5 2.6 3.0.0 3.1.x 3.2.x 3.3.x 3.4.x (to release)
PMD 5.4.0 5.4.2 5.4.2 6.9.0 6.10.0 6.30.0 6.45.0
Max. supported Java Version 1.7 1.8 1.8 11 15 18
Min. SonarQube Version 4.5.4 4.5.4 6.6 6.7 8.9(*) / 9.3

(*) Note: Plugin version 3.4.x runs in SonarQube 8.9, however, Java 17+ is only fully supported in SonarQube 9.3+.

A majority of the PMD rules have been rewritten in the Java plugin. Rewritten rules are marked "Deprecated" in the PMD plugin, but a concise summary of replaced rules is available.

Rules on test

PMD tool provides some rules that can check the code of JUnit tests. Please note that these rules (and only these rules) will be applied only on the test files of your project.

License

Sonar-PMD is licensed under the GNU Lesser General Public License, Version 3.0.

Parts of the rule descriptions displayed in SonarQube have been extracted from PMD and are licensed under a BSD-style license.

Build and test the plugin

To build the plugin and run the integration tests:

./mvnw clean verify

sonar-pmd's People

Contributors

benzonico avatar char16t avatar christophelevis avatar csatomfr avatar dbolkensteyn avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dgageot avatar ehartmann avatar fmallet avatar ganncamp avatar ganntest avatar godin avatar jborgers avatar jensgerdes avatar lindamartin avatar mpaladin avatar pynicolas avatar robinverduijn avatar simon04 avatar simonbrandhof avatar stokpop avatar timwebster9 avatar tomverin avatar wohops avatar

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.