简体   繁体   English

Checkstyle Jenkins - 如何在Jenkins中配置Checkstyle?

[英]Checkstyle Jenkins - How do I Configure Checkstyle in Jenkins?

I am new to using Jenkins and I recently built a project with it and installed the "Checkstyle" plugin and received a report. 我是新手使用Jenkins,我最近用它构建了一个项目并安装了“Checkstyle”插件并收到了一份报告。

I want to know how I can configure "Checkstyle" to, let's say, ignore whitespaces or other criteria that may come up? 我想知道如何配置“Checkstyle”,比方说,忽略可能出现的空格或其他标准?

Thank you! 谢谢!

Jenkins simply reads the checkstyle report after it was run in the course of a build, and is extraneous to the question. Jenkins只是在构建过程中运行后读取checkstyle报告,并且与问题无关。 To configure checkstyle, you want to modify or create checkstyle.xml (the location is configurable via method based your choice of build automation tool, such as maven or gradle . The checkstyle manual has further details on how to accomplish any checks you may desire. 要配置checkstyle,您需要修改或创建checkstyle.xml(该位置可通过基于您选择的构建自动化工具的方法进行配置,例如mavengradle。checkstyle 手册有关于如何完成您可能需要的任何检查的更多详细信息。

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

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