Check Style Indentation violation - 'public' have incorrect indentation level 4, expected level should be 8

喜夏-厌秋 提交于 2019-12-11 02:57:58

问题


I am getting an checkstyle sonar violation on indendation rule (com.puppycrawl.tools.checkstyle.checks.indentation)

'public' have incorrect indentation level 4, expected level should be 8.

at this line

    public Response getItem(@PathParam(CODE) final ProgramCode programCode,

In Intelliji, Kindly suggest on how to change the indentation level to 8


回答1:


Open up preferences (cmd + , on the Mac, ctrl + alt + s on Windows), and go to Editor -> Code Style -> Java. On the tabs and indents spaces you can set the indents to 8.




回答2:


The error is related to indentation; that is:

If U have applied some checkstyle then you may not follow its rule simply click Ctrl + Shift + F (Auto Format).



来源:https://stackoverflow.com/questions/31831321/check-style-indentation-violation-public-have-incorrect-indentation-level-4

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