--- a/pom.xml
+++ b/pom.xml
@@ -366,6 +366,12 @@
       <version>1.4.1</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.assertj</groupId>
+      <artifactId>assertj-core</artifactId>
+      <version>${assertj.version}</version>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>nl.jqno.equalsverifier</groupId>
       <artifactId>equalsverifier</artifactId>
@@ -2422,6 +2428,8 @@
                     <arg>
                       -Xplugin:ErrorProne ${error-prone.configuration-args}
                     </arg>
+                    <arg>-Xmaxwarns</arg>
+                    <arg>1000000</arg>
                   </compilerArgs>
                   <annotationProcessorPaths>
                     <path>
@@ -2434,6 +2442,11 @@
                       <artifactId>error-prone-contrib</artifactId>
                       <version>${error-prone-support.version}</version>
                     </path>
+                    <path>
+                      <groupId>tech.picnic.error-prone-support</groupId>
+                      <artifactId>refaster-runner</artifactId>
+                      <version>${error-prone-support.version}</version>
+                    </path>
                   </annotationProcessorPaths>
                 </configuration>
               </execution>
@@ -2476,9 +2489,10 @@
                     <arg>-XDcompilePolicy=simple</arg>
                     <arg>
                       -Xplugin:ErrorProne \
-                      -XepExcludedPaths:.*[\\/]resources[\\/].* \
                       ${error-prone.configuration-args}
                     </arg>
+                    <arg>-Xmaxwarns</arg>
+                    <arg>1000000</arg>
                   </compilerArgs>
                   <annotationProcessorPaths>
                     <path>
@@ -2491,6 +2505,11 @@
                       <artifactId>error-prone-contrib</artifactId>
                       <version>${error-prone-support.version}</version>
                     </path>
+                    <path>
+                      <groupId>tech.picnic.error-prone-support</groupId>
+                      <artifactId>refaster-runner</artifactId>
+                      <version>${error-prone-support.version}</version>
+                    </path>
                   </annotationProcessorPaths>
                 </configuration>
               </execution>
--- a/src/main/java/com/puppycrawl/tools/checkstyle/DetailNodeTreeStringPrinter.java
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/DetailNodeTreeStringPrinter.java
@@ -63,6 +63,8 @@ public final class DetailNodeTreeStringPrinter {
      * @return DetailNode tree
      * @throws IllegalArgumentException if there is an error parsing the Javadoc.
      */
+    // Invoking `getParseErrorMessage` requires that `status.getParseErrorMessage()` is `null`.
+    @SuppressWarnings("CheckArgumentWithMessage")
     public static DetailNode parseJavadocAsDetailNode(DetailAST blockComment) {
         final JavadocDetailNodeParser parser = new JavadocDetailNodeParser();
         final ParseStatus status = parser.parseJavadocAsDetailNode(blockComment);
--- a/src/main/java/com/puppycrawl/tools/checkstyle/SarifLogger.java
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/SarifLogger.java
@@ -139,6 +139,9 @@ public class SarifLogger extends AbstractAutomaticBean implements AuditListener
     @Override
     public void auditFinished(AuditEvent event) {
         final String version = SarifLogger.class.getPackage().getImplementationVersion();
+        // Here `version` may be `null`, while `String#replace` requires non-`null` arguments.
+        // XXX: Investigate better nullness handling by `IdentityConversion`.
+        @SuppressWarnings("IdentityConversion")
         final String rendered = report
             .replace(VERSION_PLACEHOLDER, String.valueOf(version))
             .replace(RESULTS_PLACEHOLDER, String.join(",\n", results));
--- a/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java
@@ -93,6 +93,8 @@ import de.thetaphi.forbiddenapis.SuppressForbidden;
  * @noinspectionreason ClassWithTooManyDependencies - complex tests require a large number
  *      of imports
  */
+// This class is referenced from another package.
+@SuppressWarnings("JUnitClassModifiers")
 public class CheckerTest extends AbstractModuleTestSupport {
 
     @TempDir
--- a/src/test/java/com/puppycrawl/tools/checkstyle/ConfigurationLoaderTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/ConfigurationLoaderTest.java
@@ -47,6 +47,8 @@ import com.puppycrawl.tools.checkstyle.internal.utils.TestUtil;
 /**
  * Unit test for ConfigurationLoader.
  */
+// This class is referenced from another package.
+@SuppressWarnings("JUnitClassModifiers")
 public class ConfigurationLoaderTest extends AbstractPathTestSupport {
 
     @Override
--- a/src/test/java/com/puppycrawl/tools/checkstyle/PackageObjectFactoryTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/PackageObjectFactoryTest.java
@@ -98,6 +98,8 @@ public class PackageObjectFactoryTest {
     public void testCtorNullPackageException1() {
         final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         try {
+            // XXX: Don't suggest `ImmutableSet.of(elem)` for nullable `elem`.
+            @SuppressWarnings("ImmutableSetOf1")
             final Object test = new PackageObjectFactory(Collections.singleton(null), classLoader);
             assertWithMessage("Exception is expected but got " + test).fail();
         }
@@ -126,6 +128,8 @@ public class PackageObjectFactoryTest {
     public void testCtorNullPackageException3() {
         final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         try {
+            // XXX: Don't suggest `ImmutableSet.of(elem)` for nullable `elem`.
+            @SuppressWarnings("ImmutableSetOf1")
             final Object test = new PackageObjectFactory(Collections.singleton(null), classLoader,
                     TRY_IN_ALL_REGISTERED_PACKAGES);
             assertWithMessage("Exception is expected but got " + test).fail();
--- a/src/test/java/com/puppycrawl/tools/checkstyle/TreeWalkerTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/TreeWalkerTest.java
@@ -80,6 +80,8 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtil;
  * @noinspectionreason ClassWithTooManyDependencies - complex tests require a
  *      large number of imports
  */
+// This class is referenced from another package.
+@SuppressWarnings("JUnitClassModifiers")
 public class TreeWalkerTest extends AbstractModuleTestSupport {
 
     @TempDir
--- a/src/test/java/com/puppycrawl/tools/checkstyle/utils/CheckUtilTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/utils/CheckUtilTest.java
@@ -47,6 +47,8 @@ import com.puppycrawl.tools.checkstyle.checks.coding.NestedIfDepthCheck;
 import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck;
 import com.puppycrawl.tools.checkstyle.checks.naming.AccessModifierOption;
 
+// This class is referenced from another package.
+@SuppressWarnings("JUnitClassModifiers")
 public class CheckUtilTest extends AbstractModuleTestSupport {
 
     @Override
