Skip to content

feat: ✨ Add Rust support - #106

Open
robvanderleek wants to merge 2 commits into
mainfrom
issue-105-Add_Rust_support
Open

robvanderleek wants to merge 2 commits into
mainfrom
issue-105-Add_Rust_support

Conversation

@robvanderleek

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

Copy link
Copy Markdown

CodeLimit Report

Overview

Language Files Functions Lines of Code ⚠ ⛌
Python 93 365 2425 1 0

Summary

Easy / Verbose Hard-to-maintain ⚠ Unmaintainable ⛌
98% 2% 0%

✅ 98% of the functions are maintainable, no refactoring necessary.

Findings

Function Length File
⚠ _print_totals 46 codelimit/common/report/format_markdown.py

Generated by CodeLimit

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Valid nested Rust signatures are misparsed, documentation is inaccurate, and an unrelated pre-commit configuration is removed.

2 open findings
What changed in this PR

Adds Rust function measurement support to the language-scanning pipeline.

Changes:

  • Implements and registers Rust function parsing.
  • Adds Rust parser tests and contributor guidance.
  • Removes the repository’s pre-commit configuration.
File Description
codelimit/​languages/​Rust.py Implements Rust header and block extraction.
codelimit/​languages/​__init__.py Registers Rust support.
tests/​languages/​test_Rust.py Tests common Rust function forms.
CLAUDE.md Adds repository development guidance.
.pre-commit-config.yaml Removes local pre-commit hook configuration.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

return get_headers(
tokens,
[Keyword("fn"), Name()],
[ZeroOrMore(And(Not(";"), Not("{"))), Symbol("{")],
Comment thread CLAUDE.md
and a new language must be imported in `codelimit/languages/__init__.py`.
- Brace languages use `scope_utils.get_blocks(tokens, "{", "}")`. Python uses indentation-based block detection.
- `allow_nested_functions=False` drops nested scopes instead of folding them into their parent as children.
- Functions preceded by a `# nocl` / `// nocl` comment are excluded (`source_utils.filter_nocl_comment_tokens`).

This branch has not been deployed

No deployments
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