# `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`). :::{dropdown} References :icon: link :color: secondary __Relates to:__ [`SF016` Scan code for requirement references](/requirements/SF016) ::: :::{dropdown} Source :icon: file-code :color: info __Source file__: [`specs/nonfunctional.yaml`](https://github.com/agagniere/speky/blob/master/specs/nonfunctional.yaml) __Loaded from__: [`speky`](https://github.com/agagniere/speky/blob/master/specs/speky.yaml) :::