Skip to content

Commit c417e13

Browse files
jbachorikclaude
andauthored
Fix build config: revert buildSearchableOptions to tasks block, remove unused Java plugin dep (#1)
* Fix build config: revert buildSearchableOptions to tasks block, remove unused Java plugin dep - Move buildSearchableOptions disable back to tasks block (the extension property may not exist in IntelliJ Platform Gradle Plugin 2.3.0) - Remove bundledPlugin("com.intellij.java") — not used by any source code - Update foojay-resolver-convention to 1.0.0 (matches JetBrains template) https://claude.ai/code/session_015LpmjAt17XD582hZ9TPLCv * Add testFramework dependency and --stacktrace to CI for diagnostics - Add testFramework(TestFrameworkType.Platform) to dependencies — required by IntelliJ Platform Gradle Plugin 2.x for test sandbox setup - Add --stacktrace to all Gradle commands in CI for better error reporting https://claude.ai/code/session_015LpmjAt17XD582hZ9TPLCv * CI: dump test results on failure for diagnostics https://claude.ai/code/session_015LpmjAt17XD582hZ9TPLCv * Fix off-by-one errors in HunkMatcher diff remap tests Two tests passed the wrong oldLine value (off by +1), causing the remapped result to be 1 higher than expected: - parseDiffAndRemap with multiple hunks: 6→5 - parseDiffAndRemap with single line hunk: 7→6 Also remove diagnostic CI step no longer needed. https://claude.ai/code/session_015LpmjAt17XD582hZ9TPLCv --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7e0b53d commit c417e13

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040
run: chmod +x gradlew
4141

4242
- name: Build plugin
43-
run: ./gradlew buildPlugin
43+
run: ./gradlew buildPlugin --stacktrace
4444

4545
- name: Run tests
46-
run: ./gradlew test
46+
run: ./gradlew test --stacktrace
4747

4848
- name: Upload test results
4949
if: always()
@@ -84,10 +84,10 @@ jobs:
8484
run: chmod +x gradlew
8585

8686
- name: Verify plugin descriptor
87-
run: ./gradlew verifyPluginConfiguration
87+
run: ./gradlew verifyPluginConfiguration --stacktrace
8888

8989
- name: Build plugin distribution
90-
run: ./gradlew buildPlugin
90+
run: ./gradlew buildPlugin --stacktrace
9191

9292
- name: Upload plugin artifact
9393
uses: actions/upload-artifact@v4

review-plugin/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@ kotlin {
2121
dependencies {
2222
intellijPlatform {
2323
intellijIdeaCommunity("2024.1")
24-
bundledPlugin("com.intellij.java")
2524
pluginVerifier()
2625
instrumentationTools()
26+
testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform)
2727
}
2828
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
2929
testImplementation(kotlin("test"))
3030
testImplementation("junit:junit:4.13.2")
3131
}
3232

3333
intellijPlatform {
34-
buildSearchableOptions = false
3534
pluginConfiguration {
3635
id = "com.reviewplugin"
3736
name = "Agent Review"
@@ -52,4 +51,7 @@ tasks {
5251
test {
5352
useJUnit()
5453
}
54+
buildSearchableOptions {
55+
enabled = false
56+
}
5557
}

review-plugin/settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pluginManagement {
66
}
77

88
plugins {
9-
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
9+
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
1010
}
1111

1212
rootProject.name = "review-plugin"

review-plugin/src/test/kotlin/com/reviewplugin/anchor/HunkMatcherTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class HunkMatcherTest {
159159
""".trimIndent()
160160
// After first hunk: offset = (2+3)-(2+2) = 1
161161
// Old line 5 is between hunks → 5 - 1 + 1 = 5 (0-based)
162-
assertEquals(5, HunkMatcher.parseDiffAndRemap(diff, 6))
162+
assertEquals(5, HunkMatcher.parseDiffAndRemap(diff, 5))
163163
}
164164

165165
@Test
@@ -174,7 +174,7 @@ class HunkMatcherTest {
174174
// Old line 5 is in the hunk (5..5)
175175
assertNull(HunkMatcher.parseDiffAndRemap(diff, 5))
176176
// Old line 6 is after: offset = (5+2)-(5+1) = 1, result = 6-1+1 = 6
177-
assertEquals(6, HunkMatcher.parseDiffAndRemap(diff, 7))
177+
assertEquals(6, HunkMatcher.parseDiffAndRemap(diff, 6))
178178
}
179179

180180
// ── fuzzySearch ─────────────────────────────────────────────────

0 commit comments

Comments
 (0)