Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有没有命令行运行的方式 #50

Closed
tengzhaoyong opened this issue Oct 16, 2017 · 9 comments
Closed

有没有命令行运行的方式 #50

tengzhaoyong opened this issue Oct 16, 2017 · 9 comments

Comments

@tengzhaoyong
Copy link

有没有提供命令行运行方式,比如执行mvn xxx就可以在workspace下生成对应的扫描结果文件

@zengyoubin
Copy link

同求

@ghost
Copy link

ghost commented Oct 19, 2017

很棒的插件,希望可以增加命令行工具,能更方便的集成到 ci 里

@shiluming
Copy link

同求

@weifabing
Copy link

赞同,希望尽快推出

@xuantan
Copy link
Collaborator

xuantan commented Oct 31, 2017

@smiler158 可以提供下样例

@tengzhaoyong
Copy link
Author

研究出来了,命令行方式如下:
/home/work/pmd-bin-5.8.1/bin/run.sh pmd -d /user/local/workspace/ -R java-ali-other,java-ali-comment -f text

run.sh为pmd官方下载的,-d 指定源代码路径,-R指定阿里巴巴规范 -f 说明输出格式,提供text和html两种格式。
效果如下:
image

@fankaidev
Copy link

直接跑不行啊,会报
SEVERE: Ruleset not found

需要指定rule定义的位置吧?

@jiahut
Copy link

jiahut commented Nov 13, 2018

p3c-pmd-1.3.6.jar扔到lib里面去就可以了,还不明白的可以email询问: jiahut#gmail.com

@keepyourstyle
Copy link

keepyourstyle commented Apr 8, 2020

rule 可以配置屏蔽某些检测规则吗?
我的用法是:命令行中直接java-ali-[rule],【rule】直接使用p3c-pmd\src\main\resources\rulesets\java下的文件名就可以?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants