Skip to content

Commit d2e99e2

Browse files
Ubuntuclaude
andcommitted
feat: add JaCoCo deps, fix checkstyle skip properties, and add auto-config integration tests
Add JaCoCo runtime and CLI dependencies to Gradle build. Split Maven validation skip properties into true/false groups so failOnViolation flags are set to false instead of true. Add Gradle wrapper and integration tests for Java auto-config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 10f50b3 commit d2e99e2

7 files changed

Lines changed: 1028 additions & 6 deletions

File tree

codeflash-java-runtime/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ dependencies {
2222
implementation("org.xerial:sqlite-jdbc:3.45.0.0")
2323
implementation("org.ow2.asm:asm:9.7.1")
2424
implementation("org.ow2.asm:asm-commons:9.7.1")
25+
implementation("org.jacoco:org.jacoco.agent:0.8.13:runtime")
26+
implementation("org.jacoco:org.jacoco.cli:0.8.13:nodeps")
2527

2628
testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")
2729
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
55.6 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

codeflash-java-runtime/gradlew

Lines changed: 176 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codeflash-java-runtime/gradlew.bat

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codeflash/languages/java/maven_strategy.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727
_MAVEN_VALIDATION_SKIP_FLAGS = [
2828
"-Drat.skip=true",
2929
"-Dcheckstyle.skip=true",
30+
"-Ddisable.checks=true",
3031
"-Dcheckstyle.failOnViolation=false",
3132
"-Dcheckstyle.failsOnError=false",
33+
"-Dmaven-checkstyle-plugin.failsOnError=false",
34+
"-Dmaven-checkstyle-plugin.failOnViolation=false",
3235
"-Dspotbugs.skip=true",
3336
"-Dpmd.skip=true",
3437
"-Denforcer.skip=true",
@@ -154,19 +157,25 @@ def install_codeflash_runtime(project_root: Path, runtime_jar_path: Path, mvn: s
154157
return False
155158

156159

157-
_VALIDATION_SKIP_PROPERTIES = [
160+
# Properties set to "true" to enable skipping
161+
_VALIDATION_SKIP_PROPERTIES_TRUE = [
158162
"checkstyle.skip",
159-
"checkstyle.failOnViolation",
160-
"checkstyle.failsOnError",
161-
"maven-checkstyle-plugin.failsOnError",
162-
"maven-checkstyle-plugin.failOnViolation",
163+
"disable.checks",
163164
"spotbugs.skip",
164165
"pmd.skip",
165166
"rat.skip",
166167
"enforcer.skip",
167168
"japicmp.skip",
168169
]
169170

171+
# Properties set to "false" to disable failure on violations
172+
_VALIDATION_SKIP_PROPERTIES_FALSE = [
173+
"checkstyle.failOnViolation",
174+
"checkstyle.failsOnError",
175+
"maven-checkstyle-plugin.failsOnError",
176+
"maven-checkstyle-plugin.failOnViolation",
177+
]
178+
170179
# Plugin overrides that explicitly set <skip>true</skip> in the plugin <configuration>.
171180
# This handles parent POMs with custom execution IDs that ignore skip properties.
172181
_VALIDATION_PLUGIN_OVERRIDES = """\
@@ -209,7 +218,8 @@ def inject_validation_skip_properties(pom_path: Path) -> bool:
209218
if "<!-- codeflash-validation-skip -->" in content:
210219
return True
211220

212-
props_lines = "".join(f" <{p}>true</{p}>\n" for p in _VALIDATION_SKIP_PROPERTIES)
221+
props_lines = "".join(f" <{p}>true</{p}>\n" for p in _VALIDATION_SKIP_PROPERTIES_TRUE)
222+
props_lines += "".join(f" <{p}>false</{p}>\n" for p in _VALIDATION_SKIP_PROPERTIES_FALSE)
213223

214224
# 1. Inject properties
215225
closing_idx = content.find("</properties>")

0 commit comments

Comments
 (0)