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 3 commits 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 39s —— View job PR Review Summary
Prek ChecksAll clean — no linting or formatting issues. Code Review
The Maven flags ( The Gradle approach disables named tasks.
Correct fix. Jest/Vitest coverage JSON keys always use forward slashes regardless of OS. Using Note: The
Reasonable given the explanation (Windows CI scheduler granularity of ~15ms for 10ms target sleep). The mean accuracy check (±5%) still provides a meaningful correctness guard.
Appropriate for CI environments where Node.js startup can be slow. Duplicate DetectionNo duplicates detected. The Spotless skip logic is additive to existing plugin skip lists; the Windows path fixes are localized to the relevant JS modules. Test CoverageNew tests in Last updated: 2026-04-08 |
| "-Denforcer.skip=true", | ||
| "-Djapicmp.skip=true", | ||
| "-Derrorprone.skip=true", | ||
| "-Dspotless.check.skip=true", |
There was a problem hiding this comment.
if spotless does not exist, does this command still work correctly?
There was a problem hiding this comment.
Yes, it works correctly. If Spotless isn't in the project, the skip flag is just ignored, Maven doesn't fail on unknown system properties.
Normalize paths to forward slashes in JS/TS code generation and coverage parsing — backslashes are escape chars in JavaScript strings and cause silent corruption on Windows. Also relax timing test thresholds for CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4c70a21
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