blob: 08789c869ecc7e03f5ad478e6e2281036c8567ea [file]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
Minimal Checkstyle configuration. Formatting is owned by Spotless
(palantir-java-format); this file only enforces structural rules that a
formatter cannot express. Add rules deliberately and sparingly.
-->
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>
<module name="TreeWalker">
<!--
Tests must use JUnit 5 (Jupiter). Reject JUnit 3 (junit.framework)
and JUnit 4 (org.junit.*) imports while allowing org.junit.jupiter
and org.junit.platform.
-->
<module name="IllegalImport">
<property name="regexp" value="true"/>
<!--
Checkstyle appends "\..*" to each package pattern, so entries must
not end with a trailing dot.
-->
<property name="illegalPkgs"
value="^junit, ^org\.junit(?!\.(jupiter|platform)\.)"/>
<message key="import.illegal"
value="JUnit 3/4 is banned; use JUnit 5 (org.junit.jupiter) instead."/>
</module>
</module>
</module>