CheckStyle plugin for IDEA - java way of warnings presentation and automatic fixes?

旧时模样 提交于 2019-12-18 13:32:29

问题


  1. Is it possible to make it present the list of warnings java/spellchecker style as opposed to a old school list of errors with line numbers?
  2. Can it automatically fix things like missed space near '=' etc?

Maybe I need a different plugin, which one then?


回答1:


Try QAPlug - Checkstyle plugin. Then go Analyze - Analyze Code (not the standard Analyze!) then click "..." near Run with chosen profile select a concrete profile and press the import button.

In the next dialog select the checkstyle rules file and then click the OK button. That's it. Just wait for the results. I got something like this.

That plugin has its limitations however. For example, I didn't manage to use a file with suppressions with it.

You can also use the plugin CheckStyle-IDEA which also has good configurations and allows you to use suppressions, custom checks and displays the inspection warnings in the editor immediately, but to apply that you need to set Project Settings - Inspections - CheckStyle - Real-Time Scan in the IDE settins.

Answering the second question, I didn't find any automatical reformat capabilities in these plugins, just checks.



来源:https://stackoverflow.com/questions/11229217/checkstyle-plugin-for-idea-java-way-of-warnings-presentation-and-automatic-fix

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