#shell #indexer #bash #static-analysis

shuck-indexer

Positional and structural indexes over parsed shell scripts

30 releases

Uses new Rust 2024

new 0.0.40 May 8, 2026
0.0.39 May 7, 2026
0.0.29 Apr 30, 2026

#2196 in Parser implementations

27 downloads per month
Used in 4 crates

MIT license

2MB
49K SLoC

Positional and structural indexes over parsed shell scripts.

The indexer complements shuck-parser by building compact lookup tables for source lines, comments, syntactic regions, heredoc bodies, and physical line continuations. It is intended to be built once from parser output and then shared by semantic analysis, lint rules, suppressions, formatters, and report rendering.

All positions are byte offsets represented with shuck_ast::TextSize and shuck_ast::TextRange. The crate does not build a character index: callers that need display columns should combine these byte offsets with the original source text at the UI boundary.

Indexer is the preferred construction path when parser output is available. The lower-level indexes are also exported for integrations that only need line mapping or that already have an AST-shaped source of comments or regions.


shuck-indexer

shuck-indexer builds positional and structural indexes over parsed shell scripts.

It sits between parsing and higher-level analysis by providing efficient lookups for lines, comments, quoted regions, heredocs, command substitutions, and continuation lines. The crate is published for downstream integrations but is still pre-1.0.

Dependencies