Skip to content

feat: Update function and class definitions to use specific expressio…#178

Merged
rostilos merged 1 commit intomainfrom
1.5.7-rc
Mar 31, 2026
Merged

feat: Update function and class definitions to use specific expressio…#178
rostilos merged 1 commit intomainfrom
1.5.7-rc

Conversation

@rostilos
Copy link
Copy Markdown
Owner

@rostilos rostilos commented Mar 31, 2026

…ns in scope queries

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of function expressions and class expressions in JavaScript, TypeScript, and TSX code analysis.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 31, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Updates Tree-sitter scope query files for JavaScript, TypeScript, and TSX to capture function_expression and class_expression nodes instead of function and class declaration nodes for semantic scope analysis.

Changes

Cohort / File(s) Summary
Tree-sitter Scope Query Updates
java-ecosystem/libs/ast-parser/src/main/resources/queries/javascript/scopes.scm, java-ecosystem/libs/ast-parser/src/main/resources/queries/typescript/scopes.scm, java-ecosystem/libs/ast-parser/src/main/resources/queries/tsx/scopes.scm
Updated capture patterns to recognize function_expression nodes instead of function nodes for @function.def capture. JavaScript also updated class_expression for @class.def capture.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hops through the AST with glee,
Expression forms now we can see,
Functions leap where they're defined,
Scope queries perfectly aligned!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly relates to the main changes: updating function and class definitions to use specific expressions (function_expression and class_expression) in scope queries across JavaScript, TypeScript, and TSX files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 1.5.7-rc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@rostilos rostilos merged commit 159bb3a into main Mar 31, 2026
1 check was pending
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