Checkstyle: Custom Rules - Eclipse Plugin

ε祈祈猫儿з 提交于 2019-12-01 08:47:35

You already have the correct links that will eventually get you there. As for your questions:

  1. All your custom checks can go into one JAR file. That JAR file must be an Eclipse plugin JAR. I simply install it by copying it to the Eclipse dropins folder, but there may be more elegant ways to do that.

  2. So you end up with two plugins: The original, unmodified Eclipse-CS, and your own plugin which contains the custom checks. When both are independently installed in Eclipse, the Eclipse-CS configuration dialog will offer your custom checks for use in Checkstyle configurations.

You can do it like following :

  1. Create plugin project and add your custom checks there.
  2. Make appropriate changes to plugin.xml, checkstyle_packages.xml.
  3. Export the project as Deployable Plug-ins and fragments (Export > Plug-in Developement)
  4. Copy the jar file to Eclipse Plugin folde, so no need to install your custom check .

You can refer this tutorial

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