Skip to content

Conversation

Copy link

Copilot AI commented Nov 2, 2025

Implements Kotlin code analysis to enable graph representation of Kotlin codebases alongside existing Python and Java support.

Changes

  • api/analyzers/kotlin/analyzer.py: New KotlinAnalyzer implementing AbstractAnalyzer

    • Parses classes, interfaces, objects (singletons), functions, and methods
    • Extracts inheritance, interface implementation, function calls, parameters, return types
    • Supports KDoc documentation extraction
  • api/analyzers/source_analyzer.py:

    • Registered .kt and .kts extensions with KotlinAnalyzer
    • Added Kotlin to file discovery in analyze_sources()
    • Integrated language server placeholder (uses NullLanguageServer pending LSP configuration)
  • pyproject.toml: Added tree-sitter-kotlin ^1.1.0 dependency

  • README.md: Updated supported languages from "Python and C" to "Python, Java, and Kotlin"

Example

interface Task {
    fun execute()
}

class WorkerTask(val name: String) : Task {
    override fun execute() {
        println("Executing: $name")
    }
    
    fun abort(): WorkerTask {
        return this
    }
}

object TaskManager {
    fun createTask(name: String) = WorkerTask(name)
}

The analyzer extracts entities (Interface: Task, Class: WorkerTask, Object: TaskManager) and relationships (IMPLEMENTS, CALLS, RETURNS) to build the code graph.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add support for Kotlin</issue_title>
<issue_description>Would appreciate. I believe there is nothing yet on the field with kotlin support.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits November 2, 2025 08:13
Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
… construction

Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Nov 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
code-graph-backend Ready Ready Preview Comment Nov 2, 2025 8:37am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Add support for Kotlin

2 participants