Skip to content

Commit 286ef61

Browse files
committed
Narrow auto-configure checkstyle suppressions
Closes gh-21015
1 parent 4f95486 commit 286ef61

File tree

7 files changed

+33
-7
lines changed

7 files changed

+33
-7
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureOrder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
@Documented
4949
public @interface AutoConfigureOrder {
5050

51+
/**
52+
* The default order value.
53+
*/
5154
int DEFAULT_ORDER = 0;
5255

5356
/**

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
@Import(AutoConfigurationImportSelector.class)
8484
public @interface EnableAutoConfiguration {
8585

86+
/**
87+
* Environment property that can be used to override when auto-configuration is
88+
* enabled.
89+
*/
8690
String ENABLED_OVERRIDE_PROPERTY = "spring.boot.enableautoconfiguration";
8791

8892
/**

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cloud/CloudServiceConnectorsAutoConfiguration.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@
5454
@Import(CloudScanConfiguration.class)
5555
public class CloudServiceConnectorsAutoConfiguration {
5656

57-
// Cloud configuration needs to happen early (before data, mongo etc.)
57+
/**
58+
* The order for cloud configuration. Cloud configurations need to happen early (so
59+
* that they run before data, mongo, etc.).
60+
*/
5861
public static final int ORDER = Ordered.HIGHEST_PRECEDENCE + 20;
5962

6063
private static final Log logger = LogFactory.getLog(CloudServiceConnectorsAutoConfiguration.class);

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,18 +400,28 @@ else if (StringUtils.hasLength(this.plural)) {
400400
*/
401401
public enum Style {
402402

403+
/**
404+
* Render with normal styling.
405+
*/
403406
NORMAL {
407+
404408
@Override
405409
protected Object applyToItem(Object item) {
406410
return item;
407411
}
412+
408413
},
409414

415+
/**
416+
* Render with the item surrounded by quotes.
417+
*/
410418
QUOTE {
419+
411420
@Override
412421
protected String applyToItem(Object item) {
413422
return (item != null) ? "'" + item + "'" : null;
414423
}
424+
415425
};
416426

417427
public Collection<?> applyTo(Collection<?> items) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@
7070
@AutoConfigureAfter(ServletWebServerFactoryAutoConfiguration.class)
7171
public class DispatcherServletAutoConfiguration {
7272

73-
/*
74-
* The bean name for a DispatcherServlet that will be mapped to the root URL "/"
73+
/**
74+
* The bean name for a DispatcherServlet that will be mapped to the root URL "/".
7575
*/
7676
public static final String DEFAULT_DISPATCHER_SERVLET_BEAN_NAME = "dispatcherServlet";
7777

78-
/*
79-
* The bean name for a ServletRegistrationBean for the DispatcherServlet "/"
78+
/**
79+
* The bean name for a ServletRegistrationBean for the DispatcherServlet "/".
8080
*/
8181
public static final String DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME = "dispatcherServletRegistration";
8282

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,14 @@
141141
ValidationAutoConfiguration.class })
142142
public class WebMvcAutoConfiguration {
143143

144+
/**
145+
* The default Spring MVC view prefix.
146+
*/
144147
public static final String DEFAULT_PREFIX = "";
145148

149+
/**
150+
* The default Spring MVC view suffix.
151+
*/
146152
public static final String DEFAULT_SUFFIX = "";
147153

148154
private static final String[] SERVLET_LOCATIONS = { "/" };

src/checkstyle/checkstyle-suppressions.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="Javadoc*" />
1616
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" id="mainCodeIllegalImportCheck" />
1717
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="NonEmptyAtclauseDescription" />
18-
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocType" />
19-
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocVariable" />
18+
<suppress files="[\\/]autoconfigure[\\/].*Properties\.java" checks="JavadocType" />
19+
<suppress files="[\\/]autoconfigure[\\/].*Properties\.java" checks="JavadocVariable" />
2020
<suppress files="[\\/]spring-boot-docs[\\/]" checks="JavadocType" />
2121
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="JavadocType" />
2222
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="ImportControl" />

0 commit comments

Comments
 (0)