Giter VIP home page Giter VIP logo

sonar-pmd-p3c's Introduction

SonarQube PMD Plugin Maven Central Build Status SonarStatus SonarStatus

Sonar-PMD is a plugin that provides coding rules from PMD.

Description / Features

PMD Plugin 2.0 2.1 2.2 2.3 2.4.1 2.5 2.6 3.0.0 3.1.x 3.2.x
PMD 4.3 4.3 5.1.1 5.2.1 5.3.1 5.4.0 5.4.2 5.4.2 6.9.0 6.10.0
Max. supported Java Version 1.7 1.8 1.8 11
Min. SonarQube Version 4.5.4 4.5.4 6.6 6.6

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.

Usage

In the quality profile, activate some rules from PMD and run an analysis on your project. Set the sonar.java.source property to tell PMD which version of Java your source code complies to. The default value is 1.6.

Possible values:

  • 1.4
  • 1.5 or 5
  • 1.6 or 6
  • 1.7 or 7
  • 1.8 or 8
  • 9
  • 10
  • 11

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

Licensed under the GNU Lesser General Public License, Version 3.0

备注

在官方仓库tag中的3.2.1版本和alibaba/p3c的2.0.0版本上开发。 使用参考:

  1. 使用mvn clean package -DskipTests打包后将jar包上传到SonarQube extensions/plugins目录下后再重启SonarQube服务即可完成Sonar插件的部署
  2. 有管理员权限的账号登陆SonarQube后点击顶部菜单的“代码规则”,在页面中点击“资源库”,下方出现“PMD P3C Java 55”即代表插件没有问题。其中“Java”代表适用于Java语言,“55”代表有55条规则。
  3. 点击顶部菜单的“质量配置”页面“Java配置”,默认的“Sonar way”不支持修改,点击后面箭头的“复制”,然后在复制出的配置中将刚才的“PMD P3C”的55条规则添加到此配置中,然后将此配置激活设置成默认即可。
  4. 新分析的即可在SonarQube中查看到P3C的规则已经生效。

sonar-pmd-p3c's People

Contributors

jensgerdes avatar pynicolas avatar mpaladin avatar wohops avatar dependabot-support avatar ehartmann avatar timwebster9 avatar lindamartin avatar benzonico avatar huayaoyue6 avatar ganntest avatar ganncamp avatar godin avatar dbolkensteyn avatar csatomfr avatar dgageot avatar fmallet avatar tomverin avatar christophelevis avatar simonbrandhof avatar simon04 avatar char16t 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.