在思想上,我转向选项“第一列的评论”
CheckStyle抛出一个错误如何解决它
Comment has incorrect indentation level 0, expected is 10, indentation should be the same level as line 139. [CommentsIndentation]编辑28.06.2019
观念偏好

If块
148: CompletableFuture.allOf(terminateEnvironmentResponseCompletableFuture, checkInvoicePaidResponseCompletableFuture,
149: inactiveUserResponseCompletableFuture).whenComplete((v, th) -> {
151: if (th != null) {
152: log.error(th.getMessage(), th);
153: }
154: finishDelete(userDto);
155: });错误:
....java:150: 'if' has incorrect indentation level 14, expected level should be 18. [Indentation]
....java:151: 'if' child has incorrect indentation level 16, expected level should be 20. [Indentation]
....java:152: 'if rcurly' has incorrect indentation level 14, expected level should be 18. [Indentation]
....java:153: 'block' child has incorrect indentation level 14, expected level should be 18. [Indentation]
....java:154: 'block rcurly' has in*correct indentation level 12, expected level should be 16. [Indentation]注释
108: .withIdentity("ServicesTrigger", "TriggerGroup")
109:// is fired every day at 3:00 am
110: .withSchedule(cronSchedule("0 0 3 * * ?"))
111:// .withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(12).repeatForever())
112: .forJob(_servicesJob)
113: .build();
114: _scheduler.scheduleJob(_servicesJob, serviceTrigger);错误:
....java:110: Comment has incorrect indentation level 0, expected is 10, indentation should be the same level as line 111. [CommentsIndentation]
....java:112: Comment has incorrect indentation level 0, expected is 10, indentation should be the same level as line 113. [CommentsIndentation]发布于 2019-07-01 14:06:17
在思想上,我转向选项“第一列的评论” CheckStyle抛出一个错误如何解决它
CommentsIndentation目前不支持第一列中需要的注释。默认行为是注释必须在与周围代码相同的缩进处。
如果您想从CommentsIndentation中看到这种行为,您将需要在github上的校验样式上创建一个问题。现在,我建议禁用支票。要么从配置中删除它,要么注释掉它。
发布于 2021-11-08 18:53:14
您可以将注释斜杠"//“放在注释行文本的正前方。可以解决你的问题。
你的例子:
108: .withIdentity("ServicesTrigger", "TriggerGroup")
109: //is fired every day at 3:00 am
110: .withSchedule(cronSchedule("0 0 3 * * ?"))
111: //.withSchedule(SimpleScheduleBuilder. etc...https://stackoverflow.com/questions/56792141
复制相似问题