From 39de995740e0af5ba1f676cdda4b6b40764cdc96 Mon Sep 17 00:00:00 2001 From: Rory Hunter Date: Fri, 28 Feb 2020 20:54:47 +0000 Subject: [PATCH] Exclude generated source from benchmarks formatting (#52968) IDEs can sometimes run annotation processors that leave files in `src/main/generated/**/*.java`, causing Spotless to complain. Even though this path ought not to exist, exclude it anyway in order to avoid spurious failures. --- benchmarks/build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle index 70a8438dacf..2693a05fb72 100644 --- a/benchmarks/build.gradle +++ b/benchmarks/build.gradle @@ -64,3 +64,12 @@ thirdPartyAudit.ignoreViolations( 'org.openjdk.jmh.profile.HotspotRuntimeProfiler', 'org.openjdk.jmh.util.Utils' ) + +spotless { + java { + // IDEs can sometimes run annotation processors that leave files in + // here, causing Spotless to complain. Even though this path ought not + // to exist, exclude it anyway in order to avoid spurious failures. + targetExclude 'src/main/generated/**/*.java' + } +}