How can I easily fix Checkstyle errors?

前端 未结 6 2300
失恋的感觉
失恋的感觉 2020-12-14 16:40

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

6条回答
  •  [愿得一人]
    2020-12-14 17:24

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

    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.

提交回复
热议问题