Repository navigation
Conversation
The name-in-body check reported imports that Kotlin uses without writing their names: - operator conventions, e.g. `getValue`/`setValue` imported for `var x by mutableStateOf(0)` (33 false positives on one Android app), `contains` for `in`, `componentN` for destructuring; - backtick-escaped names such as Mockito's `when`; - `import a.B as C` aliases (the `import_alias` node was not read); - wildcard imports, reported under their package's last segment. Add `implicit_import_uses` to TreeSitterLangSpec: (name, regex) pairs that count an import as used when the syntax that calls it is present, and fill it with Kotlin's operator conventions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
added a commit
to citizenadam/desloppify
that referenced
this pull request
Oct 30, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The tree-sitter unused-import check (name must appear in the file) reported Kotlin imports that are used without writing their names:
getValue/setValueimported forvar x by mutableStateOf(0). That's 33 false positives on one Compose app. Alsocontainsforin,componentNfor destructuring, and others;`when`;import a.B as Caliases (the Kotlinimport_aliasnode was never read);Fix
TreeSitterLangSpec.implicit_import_uses:(name, regex)pairs. An import whose name never appears still counts as used when the syntax that calls it is present (e.g.setValueneeds avar … by). Kotlin's operator conventions are filled in onKOTLIN_SPEC.import_alias, skip wildcard imports.Real unused imports are still reported (it found 6 genuine ones in the same app).
Tested: new tests pass; the full suite on Windows has the same 32 failures as
main(path/CRLF issues unrelated to this change). Verified against a real Android app (Kotlin, 113 production files).🤖 Generated with Claude Code