mrprince / sonar-p3c-pmd Goto Github PK
View Code? Open in Web Editor NEWSonar p3c pmd plugin
License: MIT License
Sonar p3c pmd plugin
License: MIT License
after do as follow docs "
1.Package jar
git clone https://github.com/mrprince/sonar-p3c-pmd.git
mvn package
2.Download sonarqube-7.0
wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-7.0.zip
3.Install puglin
put generate sonar-pmd-plugin-2.6.jar into extensions\plugins
run bin\linux-x86-64\sonar.sh
3.Config
Add new Quality Profiles - "p3c", click "Activate More" button, search keyword "[p3c]", active all rules.
enjoy!! "
then call sonar-scanner by jenkins job to do anayzle project, but it was halted at "INFO: Quality profile for java: p3c
INFO: Quality profile for xml: Sonar way
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=20ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=6ms
INFO: Java Main Files AST scan
INFO: 1324 source files to be analyzed
INFO: 283/1324 files analyzed, current file: /home/jenkins/workspace/static-analyse@3/yzbizcenter-admin/console/src/main/java/com/xiyunerp/yzbizcenter/console/service/CanteenService.java
INFO: 813/1324 files analyzed, current file: /home/jenkins/workspace/static-analyse@3/yzbizcenter-admin/model/src/main/java/com/xiyunerp/yzbizcenter/model/form/wechat/WechatMccForm.java
INFO: 1186/1324 files analyzed, current file: /home/jenkins/workspace/static-analyse@3/yzbizcenter-admin/web/src/main/java/com/xiyunerp/yzbizcenter/web/YzbizcenterApplication.java
INFO: 1324/1324 source files have been analyzed
INFO: Java Main Files AST scan (done) | time=33872ms
INFO: Java Test Files AST scan
INFO: 0 source files to be analyzed
INFO: Java Test Files AST scan (done) | time=1ms
INFO: 0/0 source files have been analyzed
INFO: Sensor JavaSquidSensor [java] (done) | time=34491ms
INFO: Sensor PmdSensor [pmd]
INFO: Execute PMD 5.4.2...
INFO: Java version: 1.5
INFO: PMD configuration: /home/jenkins/workspace/static-analyse@3/yzbizcenter-admin/.scannerwork/pmd.xml
"
pls can see
"
pls help me !!! many thanks!!!
使用sonarQube7版本以上,提示无法加载plugin。看错误是使用的api接口已经废弃了。
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/batch/Sensor
将这个插件的规则设置为默认后,使用jenkins构建,就会报如下异常:
Caused by: java.lang.TypeNotPresentException: Type com.xxx not present,
报的找不到的类都是maven引入的其他模块的jar包里的,
改回sonar内置的规则为默认后,正常打包,请问是什么原因呢
How to use this plugin?
Can you describe the usage?
相关配置文件是代码生成的还是手写的?
如果生成的能否连带生成工具一起开源?
本地使用sonarlint时,规则无法下载到本地。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.