|
24 | 24 |
|
25 | 25 | <property name="fileExtensions" value="java, properties, xml"/> |
26 | 26 |
|
| 27 | + <!-- Suppressions. See: https://checkstyle.sourceforge.io/filters/suppressionfilter.html --> |
| 28 | + <module name="SuppressionFilter"> |
| 29 | + <property name="file" value="${checkstyle.suppressions.file}"/> |
| 30 | + </module> |
| 31 | + |
27 | 32 | <!-- Whitespaces Checks. See: http://checkstyle.sourceforge.net/config_whitespace.html --> |
28 | 33 | <module name="FileTabCharacter"> |
29 | 34 | <property name="eachLine" value="true"/> |
|
39 | 44 | </module> |
40 | 45 |
|
41 | 46 | <module name="TreeWalker"> |
| 47 | + <!-- Suppressions. See: https://checkstyle.sourceforge.io/filters/suppressionxpathfilter.html --> |
| 48 | + <module name="SuppressionXpathFilter"> |
| 49 | + <property name="file" value="${checkstyle.suppressions.file}"/> |
| 50 | + </module> |
| 51 | + |
42 | 52 | <!-- Coding Checks. See: https://checkstyle.sourceforge.io/config_coding.html --> |
43 | 53 | <module name="SimplifyBooleanExpression"/> |
44 | 54 |
|
|
88 | 98 |
|
89 | 99 | <!-- @Override annotations on the same line with a method declaration check. --> |
90 | 100 | <module name="AnnotationOnSameLine" /> |
91 | | - <module name="SuppressionXpathSingleFilter"> |
92 | | - <property name="checks" value="AnnotationOnSameLine" /> |
93 | | - <property name="query" value="//ANNOTATION[.//IDENT[not(@text='Override')]]" /> |
94 | | - </module> |
| 101 | + |
95 | 102 | <!-- |
96 | 103 | Checks the padding between the identifier of a method definition, constructor definition, method call, or |
97 | 104 | constructor invocation; and the left parenthesis of the parameter list. |
|
172 | 179 | --> |
173 | 180 | <module name="JavadocVariable"/> |
174 | 181 |
|
175 | | - <!-- |
176 | | - Suppresses MissingJavadocMethod check violations in the specified packages. |
177 | | - See: https://checkstyle.sourceforge.io/config_filters.html#SuppressionXpathSingleFilter |
178 | | - --> |
179 | | - <module name="SuppressionXpathSingleFilter"> |
180 | | - <property name="checks" value="(?<!Missing)JavadocMethod"/> |
181 | | - <property name="files" value="[\\/]internal[\\/]|[\\/]test[\\/]|[\\/]tests[\\/]|[\\/]ml[\\/]|[\\/]yardstick[\\/]"/> |
182 | | - </module> |
183 | | - |
184 | | - <!-- |
185 | | - Suppresses all Javadoc check violations in the specified files. |
186 | | - See: https://checkstyle.sourceforge.io/config_filters.html#SuppressionXpathSingleFilter |
187 | | - --> |
188 | | - <module name="SuppressionXpathSingleFilter"> |
189 | | - <property name="checks" value="Javadoc"/> |
190 | | - <property name="files" value="BCrypt\.java|HLL\.java|HLLMetadata\.java|HLLType\.java|BigEndianAscendingWordSerializer\.java|NumberUtil\.java|SchemaVersionOne\.java|BigEndianAscendingWordDeserializer\.java|CacheView\.java|ConcurrentLinkedDeque8\.java|ConcurrentHashMap8\.java|ConcurrentLinkedHashMap\.java"/> |
191 | | - </module> |
192 | | - |
193 | 182 | <module name="Indentation" /> |
194 | 183 |
|
195 | 184 | <module name="LeftCurly"/> |
|
200 | 189 |
|
201 | 190 | <!-- Usage of Ignite abbrevations check. --> |
202 | 191 | <module name="org.apache.ignite.tools.checkstyle.IgniteAbbrevationsRule"/> |
| 192 | + |
| 193 | + <!-- Prevents usage of the particular Java classes in Ignite codebase. --> |
| 194 | + <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| 195 | + <property name="className" value="java.util.concurrent.ForkJoinPool"/> |
| 196 | + <property name="factoryMethods" value="commonPool"/> |
| 197 | + <property name="substitutionClassName" value="org.apache.ignite.internal.thread.pool.IgniteForkJoinPool"/> |
| 198 | + </module> |
| 199 | + |
| 200 | + <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| 201 | + <property name="className" value="java.util.concurrent.Executors"/> |
| 202 | + <property name="factoryMethods" value="newFixedThreadPool, newWorkStealingPool, newSingleThreadExecutor, newCachedThreadPool, unconfigurableExecutorService"/> |
| 203 | + <property name="substitutionClassName" value="org.apache.ignite.internal.thread.IgniteThreadPoolExecutor"/> |
| 204 | + </module> |
| 205 | + |
| 206 | + <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| 207 | + <property name="className" value="java.util.concurrent.Executors"/> |
| 208 | + <property name="factoryMethods" value="newSingleThreadScheduledExecutor, newScheduledThreadPool, unconfigurableScheduledExecutorService"/> |
| 209 | + <property name="substitutionClassName" value="org.apache.ignite.internal.thread.pool.IgniteScheduledThreadPoolExecutor"/> |
| 210 | + </module> |
| 211 | + |
| 212 | + <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| 213 | + <property name="className" value="java.util.concurrent.ThreadPoolExecutor"/> |
| 214 | + <property name="substitutionClassName" value="org.apache.ignite.internal.thread.IgniteThreadPoolExecutor"/> |
| 215 | + </module> |
| 216 | + |
| 217 | + <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| 218 | + <property name="className" value="java.util.concurrent.ScheduledThreadPoolExecutor"/> |
| 219 | + <property name="substitutionClassName" value="org.apache.ignite.internal.thread.pool.IgniteScheduledThreadPoolExecutor"/> |
| 220 | + </module> |
203 | 221 | </module> |
204 | 222 |
|
205 | 223 | <!-- |
|
0 commit comments