fix: add Spotless skip flags to Maven and Gradle validation#1946
fix: add Spotless skip flags to Maven and Gradle validation#1946mashraf-222 wants to merge 1 commit intomainfrom
Conversation
Instrumented test files fail Spotless format checks on projects like Apache Flink, Kafka, and Beam. Adds -Dspotless.check.skip=true and -Dspotless.apply.skip=true to Maven, and spotlessCheck/Apply/Java/ Kotlin/Scala task disabling to the Gradle init script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @mashraf-222's task in 1m 54s —— View job PR Review Summary
Prek ChecksNo issues. All linting, formatting, and type checks pass. Code ReviewThe fix is correct and minimal. No bugs, security issues, or breaking changes. One minor observation: No action required on this. Duplicate DetectionNo duplicates detected. The skip flags are defined exactly once each ( Test CoverageThree targeted tests added for the new flags — appropriate for this change. Tests verify both Maven flags and the three Gradle Spotless task names. LGTM. The fix is straightforward and well-tested. |
Problem
Instrumented test files (
*__perfinstrumented.java) fail Spotless Maven/Gradle format checks. The validation skip flag lists did not include Spotless, causing build failures on projects like Apache Flink (Spotless 2.43.0), Kafka, and Beam.Root Cause
_MAVEN_VALIDATION_SKIP_FLAGSinmaven_strategy.pyand_GRADLE_SKIP_VALIDATION_INIT_SCRIPTingradle_strategy.pywere missing Spotless entries. They already skipped rat, checkstyle, spotbugs, pmd, enforcer, japicmp, and errorprone — but not Spotless.Fix
Maven: Added
-Dspotless.check.skip=trueand-Dspotless.apply.skip=trueto_MAVEN_VALIDATION_SKIP_FLAGS.Gradle: Added
spotlessCheck,spotlessApply,spotlessJava,spotlessKotlin,spotlessScalato the task disable list in the init script.Validation
Verified flag works on Apache Flink:
Test Coverage
test_maven_skip_flags_include_spotless— verifies both Spotless flags presenttest_maven_skip_flags_include_all_known_plugins— verifies all plugin families coveredtest_gradle_skip_script_includes_spotless— verifies Gradle script disables Spotless tasksCloses CF-1080