В Idea я включаю опции «Комментарий в первом столбце»
CheckStyle выдает ошибку Как ее решить
Comment has incorrect indentation level 0, expected is 10, indentation should be the same level as line 139. [CommentsIndentation]
РЕДАКТИРОВАТЬ 28.06.2019
checkstyle.xml
Идея предпочтения
Если блок
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]