<?xml version="1.0"?>
<!DOCTYPE import-control PUBLIC
    "-//Checkstyle//DTD ImportControl Configuration 1.4//EN"
    "https://checkstyle.org/dtds/import_control_1_4.dtd">

<import-control pkg="com.puppycrawl.tools.checkstyle">

  <!-- Disallow obsolete Junit API -->
  <disallow pkg="org.junit" exact-match="true"/>
  <disallow pkg="junit.framework" />

  <!-- Conflicts with normal tests and pitest.
       See examples in https://github.com/checkstyle/checkstyle/issues/6439 -->
  <allow class="org.powermock.reflect.Whitebox" />
  <allow class="org.mockito.internal.util.Checks" />
  <disallow pkg="org\.powermock.*" regex="true" />
  <disallow pkg="org\.mockito.*" regex="true" />

  <allow pkg=".*" regex="true" />

  <!-- Till https://github.com/checkstyle/checkstyle/issues/7368 -->
  <subpackage name="internal">
    <subpackage name="powermock">
      <allow pkg="org.junit" local-only="true"/>
    </subpackage>
  </subpackage>

</import-control>
