简体   繁体   English

如何编写命令行脚本(不是ant任务)以生成Checkstyle报告?

[英]How to write a command line script (not ant task) to generate a checkstyle report?

I got how to write an ant task to generate a report like this but I want to use just a command line script and not ant to generate this. 我如何写一个Ant任务生成像报告这个 ,但我想只使用一个命令行脚本,而不是蚂蚁生成此。 How can I do it? 我该怎么做?

Distributions of Checkstyle include a command-line interface . Checkstyle的发行版包括一个命令行界面 If you can't use your Ant task, that might be the next option to look in to. 如果您无法使用Ant任务,则可能是查找下一个选项。

Run checkstyle with configuration file docs/sun_checks.xml on all java files in a directory 在目录中的所有Java文件上使用配置文件docs / sun_checks.xml运行checkstyle

java com.puppycrawl.tools.checkstyle.Main -c docs/sun_checks.xml -r src/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM