Skip to content

Conversation

@patdhlk
Copy link
Collaborator

@patdhlk patdhlk commented Nov 24, 2025

This pull request adds support for Rust comment syntax throughout the codebase, enabling analysis and extraction of comments from Rust source files. The changes update documentation, configuration, utility functions, and tests to recognize Rust comment styles and file extensions.

Rust support integration:

  • Added Rust ("rust") to supported comment styles in documentation, configuration, and code, including recognition of .rs files and description of supported comment syntaxes (//, /* */, ///, //!). [1] [2] [3] [4] [5]
  • Updated dependencies to include tree-sitter-rust for Rust syntax parsing.
  • Implemented Rust-specific scope node types and comment extraction queries in analyse/utils.py. [1] [2] [3]

Testing and validation:

  • Added a Rust demo source file with various comment styles and markers for test coverage.
  • Expanded test suite to validate Rust comment extraction and scope association, including new test cases and fixtures for Rust parsing. [1] [2] [3] [4]

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.39%. Comparing base (bb88d52) to head (7ecb871).

Files with missing lines Patch % Lines
src/sphinx_codelinks/analyse/utils.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
+ Coverage   89.38%   89.39%   +0.01%     
==========================================
  Files          29       29              
  Lines        2392     2414      +22     
  Branches      289      290       +1     
==========================================
+ Hits         2138     2158      +20     
- Misses        158      161       +3     
+ Partials       96       95       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@juiwenchen juiwenchen left a comment

Choose a reason for hiding this comment

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

Coool. We support Rust now!

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.

4 participants