Skip to content

Commit f9a5a5d

Browse files
committed
Add traceability, remove unused field
1 parent 7ecb871 commit f9a5a5d

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

docs/source/components/features.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,30 @@ Features
134134
.. fault:: Sphinx-codelinks halucinates traceability objects in YAML
135135
:id: FAULT_YAML_2
136136

137+
.. feature:: Rust Language Support
138+
:id: FE_RUST
139+
140+
Support for defining traceability objects in Rust source code.
141+
142+
The Rust language parser leverages tree-sitter to accurately identify and extract
143+
comments from Rust source files, including single-line (``//``, ``///``) and multi-line
144+
(``/* */``) comment styles. This ensures that traceability markers are correctly
145+
associated with the appropriate code structures such as functions, structs, enums,
146+
and traits.
147+
148+
Key capabilities:
149+
150+
* Detection of inline and block comments
151+
* Association of comments with function and method definitions
152+
* Support for standard Rust comment conventions
153+
* Accurate scope detection for nested structures
154+
155+
.. fault:: Traceability objects are not detected in Rust language
156+
:id: FAULT_RUST_1
157+
158+
.. fault:: Sphinx-codelinks halucinates traceability objects in Rust
159+
:id: FAULT_RUST_2
160+
137161
.. feature:: Customized comment styles
138162
:id: FE_CMT
139163

src/sphinx_codelinks/analyse/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def is_text_file(filepath: Path, sample_size: int = 2048) -> bool:
7777
return False
7878

7979

80-
# @Tree-sitter parser initialization for multiple languages, IMPL_LANG_1, impl, [FE_C_SUPPORT, FE_CPP, FE_PY, FE_YAML]
80+
# @Tree-sitter parser initialization for multiple languages, IMPL_LANG_1, impl, [FE_C_SUPPORT, FE_CPP, FE_PY, FE_YAML, FE_RUST]
8181
def init_tree_sitter(comment_type: CommentType) -> tuple[Parser, Query]:
8282
if comment_type == CommentType.cpp:
8383
import tree_sitter_cpp # noqa: PLC0415

0 commit comments

Comments
 (0)