Skip to content

Clean up the IDE Inspect Code warnings#34

Open
LahaLuhem wants to merge 10 commits into
nikolaikopernik:mainfrom
LahaLuhem:main
Open

Clean up the IDE Inspect Code warnings#34
LahaLuhem wants to merge 10 commits into
nikolaikopernik:mainfrom
LahaLuhem:main

Conversation

@LahaLuhem

@LahaLuhem LahaLuhem commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Went through the IDE's Inspect Code results and cleared them out, one group at a time. No behaviour changes here, just dead code, redundant bits, and stale config removed.

Mostly they are IDE-assisted directly

Cleanups

Group What got fixed
Kotlin Dropped some dead code in KtLanguageVisitor, tidied the settings and visitor classes
JVM Replaced the internal CachedSingletonsRegistry with a plain service lookup, moved the experimental-API suppressions to file level with a reason
Gradle Removed unused version-catalog aliases plus two stale run configs
Java Cleaned up the inlay hints collector (most of the group, a couple are left)
Property files Fixed up the message bundles (en + zh_CN)
XML Slimmed down the SVG icons
HTML Small fixes to the inspection description pages
JUnit Removed leftover test annotations and imports

Might need more atttention

  • CachedSingletonsRegistry is gone. It's marked @ApiStatus.Internal, so it was never really ours to use. Swapped it for SettingsState.INSTANCE (the platform caches services already), which kills the warning at the source instead of supressing it.
  • Experimental-API suppressions tidied. The scattered @Suppress("UnstableApiUsage") now sit as one @file: annotation per file, each with a one-line note on why it's there (no stable API yet, so it stays until there is one).
  • Catalog cleanup. The five flagged aliases (annotations, dokka, gradleIntelliJPlugin, kover, qodana) weren't referenced anywhere. gradleIntelliJPlugin was a leftover from the 1.x to 2.x plugin migration.
  • gitignore was regenerated from a more stable template
    • Was missing committed run config
    • Some settings changes were not tracked?
  • I left out the gradle dep bumping to next minor version. Because the dependabot shoud be doing that.

Attachments

Here are the original (baseline) exported warnings:
report_2026-06-24.sarif.json
report_2026-06-24.html.zip (quick view in browser)

Redundant, unused, when subject, unnecessary Anys, imports + symbols
unused schema declaration, attribute is not allowed
JUnit API usage from multiple versions in a single TestCase -> @test annotation
missing lang-attribute (accessibility)
Experimental API
Style -> Unused version catalog entry
@LahaLuhem LahaLuhem marked this pull request as draft June 25, 2026 06:46
@LahaLuhem LahaLuhem marked this pull request as ready for review June 25, 2026 07:58
Comment thread .run/Run Tests.run.xml
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<ExternalSystemDebugDisabled>false</ExternalSystemDebugDisabled>
<EXTENSION ID="com.intellij.execution.ExternalSystemRunConfigurationJavaExtension">
<extension name="com.fapiko.jetbrains.plugins.better_direnv.runconfigs.IdeaRunConfigurationExtension">

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is that?
Why this file is needed? There is gradle to run tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you open it in Intellij, this config was added by default, auto-detected by the IDE? It adds a nice 'Click to run' for Intellij users. I think anyone opening the project in Intellij would auto-generate this locally anyways. So if you want, I could remove it and add to .gitignore?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please. It looks strange, idea shouldn't add such. Over than that the PR looks nice!

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.

2 participants