Skip to content

Modernize plugin for IntelliJ 2025.1+, port to Kotlin, harden security#69

Open
HilaG wants to merge 3 commits into
masterfrom
modernize-2026
Open

Modernize plugin for IntelliJ 2025.1+, port to Kotlin, harden security#69
HilaG wants to merge 3 commits into
masterfrom
modernize-2026

Conversation

@HilaG
Copy link
Copy Markdown
Contributor

@HilaG HilaG commented Apr 21, 2026

Summary

  • Migrate build to IntelliJ Platform Gradle Plugin v2, targeting IntelliJ 2025.1+ (since-build 251), bump version to 2.3.0
  • Complete Java→Kotlin migration: delete CmdProcessBuilder.java / Parameters.java, finalize Kotlin replacements with @JvmStatic main and jackson-module-kotlin
  • Security hardening: single-quote all shell args in Docker run command to prevent injection; filter blank tokens from advancedDockerSettings split
  • Fix concurrent build corruption: params written to unique temp file per run instead of fixed shared path
  • Fix isDockerImage/isDockerfile from String to Boolean; implement checkConfiguration() validation
  • Fix throw Error()throw RuntimeException(), wrong Main-Class manifest, unregistered project service, dead endsWith("") condition, orphaned process on timeout
  • Add 5 unit test suites (87 tests) and Remote Robot UI test suite

Test plan

  • ./gradlew test — all 87 tests pass
  • ./gradlew runIde — plugin loads, run configuration dialog works, docker path auto-detected
  • ./gradlew runIdeForUiTests then ./gradlew uiTest — UI tests pass against live IDE

🤖 Generated with Claude Code

hgoel and others added 3 commits April 21, 2026 14:57
Build & platform:
- Migrate to IntelliJ Platform Gradle Plugin v2 (2.14.0)
- Target IntelliJ 2025.1+ (since-build 251), bump version to 2.3.0
- Upgrade Kotlin to 2.1.20, Gradle to 9.4.1
- Add .editorconfig for ktlint 12.x compatibility

Java → Kotlin migration:
- Delete CmdProcessBuilder.java and Parameters.java
- Add CmdProcessBuilder.kt (object with @JvmStatic main) and Parameters.kt
- Add jackson-module-kotlin + @JsonIgnoreProperties to fix deserialization

Security & correctness fixes:
- Single-quote shell args (envScript, runDir, makefileFile, target) to prevent injection
- Filter blank tokens from advancedDockerSettings split
- Write params to unique temp file per run (fix concurrent build corruption)
- Call destroyForcibly() before exitProcess() on timeout
- Fix docker path detection to probe Rancher Desktop and Homebrew locations
- Replace throw Error() with throw RuntimeException() in getClassPath()
- Fix Main-Class manifest: package name → CmdProcessBuilder
- Uncomment projectService registration in plugin.xml

Code quality:
- isDockerImage/isDockerfile changed from String to Boolean throughout
- Implement checkConfiguration() with required-field validation
- Extract PLUGIN_ID constant to eliminate hardcoded duplication
- Add @JsonIgnoreProperties to DockDockBuildSettings
- Remove endsWith("") dead condition in DockerfileFileChooserDescriptor
- Remove unused getParamsFile() function

Tests:
- Add unit tests: CmdProcessBuilderTest, ParametersTest, DockDockBuildTest,
  DockDockBuildConfigurableTest, DockDockBuildRunConfigurationTest
- Add UI tests via Remote Robot (DockDockBuildUiTest, requires runIdeForUiTests)
- Wire up uiTest Gradle source set and runIdeForUiTests task

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant