Checkstyle for XML, text, properties file formats

时间秒杀一切 提交于 2019-12-11 04:54:38

问题


Can checkstyle be configured to check xml, text, properties file formats. I have a requirment wherein I need to check for certain keywords in java, xml, text etc. file formats. For e.g. if in a text file the text "danger" appears, then I need to inform the user that the text danger appears in this line, please remove it.


回答1:


Checkstyle has a regular expression check that can check for any keyword for you. But I don't know how to get it to check non-java files. I think a better tool for this job is grep.




回答2:


PMD can at least check XML. For anything else you may want to consider writing a plug-in for Sonar.



来源:https://stackoverflow.com/questions/750585/checkstyle-for-xml-text-properties-file-formats

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!