SN006 Use tree-sitter for code scanningΒΆ
Code scanning shall use tree-sitter to parse source files into an AST, extracting comment nodes and correlating them with the symbol they document.
This avoids custom parsing logic and correctly handles language-specific constructs
such as Python docstrings, Rust doc comments (///), and C preprocessor directives.
Each supported language requires its corresponding tree-sitter grammar package
(tree-sitter-python, tree-sitter-go, tree-sitter-rust).
References
Relates to:
SF016 Scan code for requirement references
Source
Source file: specs/nonfunctional.yaml
Loaded from: speky