如何轻松修复Checkstyle错误? [英] How can I easily fix Checkstyle errors?

查看:210
本文介绍了如何轻松修复Checkstyle错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以让IDE自动修复Checkstyle错误,而不必手动修复每个错误?

Is there a way to have an IDE fix Checkstyle errors automatically without having to fix each manually?

推荐答案

如果您使用的是Eclipse,则可以。不过,您无法解决所有问题。有两种方法:

If you're using Eclipse, yes. You can't correct all problems though. There are two ways:


  1. 在Package Explorer或任何其他文件上右键单击Java文件,然后选择 Apply Checkstyle Corrections。
  2. >
  3. 在问题视图中单击错误,然后选择快速修复。这样可以解决问题。

  1. Right click on the java file in Package Explorer or whatever, and select 'Apply Checkstyle Corrections'.
  2. Click on the error in the problems view, and select 'Quick fix'. This corrects the problem.

这篇关于如何轻松修复Checkstyle错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆