Expand description
Linting and fix application for shell scripts parsed by the Shuck toolchain.
This crate combines parser output, semantic analysis, suppressions, and rule metadata into a
diagnostics pipeline used by shuck check.
Modules§
- rules
- Rule implementations and rule-oriented helper modules.
Structs§
- AddIgnore
Parse Error - Suppression directives, shellcheck mappings, and rewrite helpers.
- AddIgnore
Result - Suppression directives, shellcheck mappings, and rewrite helpers.
- Ambient
Contract Config - User-configurable ambient contract settings.
- Ambient
Contract Effects - User-facing contract effects.
- Ambient
Contract Spec - One user-authored ambient contract specification.
- Ambient
Function Contract Spec - Function-specific contract effects.
- Ambient
Shell Options - Linter configuration and per-file ignore types.
- Ambiguous
Array Reference - Extracted structural facts available to rules and callers.
- Analysis
Request - Request object for running linter analysis.
- Analysis
Result - Combined semantic model and diagnostic output for a file analysis pass.
- Applied
Fixes - Autofix types and fix application helpers.
- Arithmetic
Literal Fact - Extracted structural facts available to rules and callers.
- Assignment
Facts - Fact collection types and stable identifiers into those collections.
- Backtick
Fragment Fact - Extracted structural facts available to rules and callers.
- C001
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
C001unused-assignment analysis. - C063
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
C063overwritten/unreached function analysis. - C158
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
C158implicit global assignment analysis. - C159
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
C159mutable-global analysis. - C160
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
C160unanchored source path analysis. - C161
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
C161function-call ordering analysis. - Checker
- Primary checker API for walking facts and emitting diagnostics.
- Command
Fact - Extracted structural facts available to rules and callers.
- Command
Fact Queries - Fact collection types and stable identifiers into those collections.
- Command
Fact Ref - Extracted structural facts available to rules and callers.
- Command
Facts - Extracted structural facts available to rules and callers.
- Command
Id - Fact collection types and stable identifiers into those collections. Stable identifier for a semantic command in the recorded command stream.
- Compat
Facts - Fact collection types and stable identifiers into those collections.
- Compiled
PerFile Ignore List - Linter configuration and per-file ignore types.
- Conditional
Bare Word Fact - Extracted structural facts available to rules and callers.
- Conditional
Binary Fact - Extracted structural facts available to rules and callers.
- Conditional
Fact - Extracted structural facts available to rules and callers.
- Conditional
Mixed Logical Operator Fact - Extracted structural facts available to rules and callers.
- Conditional
Operand Fact - Extracted structural facts available to rules and callers.
- Conditional
Portability Facts - Extracted structural facts available to rules and callers.
- Conditional
Unary Fact - Extracted structural facts available to rules and callers.
- Diagnostic
- Rule diagnostics and severity levels.
- Edit
- Autofix types and fix application helpers.
- Effective
Ambient Contracts - Stable snapshot of the enabled ambient contract set for cache keys.
- Expansion
Analysis - Expansion
Hazards - Fact
Span - Fact collection types and stable identifiers into those collections.
- File
Description Comment Fact - Extracted structural facts available to rules and callers.
- Fix
- Autofix types and fix application helpers.
- ForHeader
Fact - Extracted structural facts available to rules and callers.
- Function
Call Arity Facts - Extracted structural facts available to rules and callers.
- Function
Header Fact - Extracted structural facts available to rules and callers.
- Glob
Pattern Behavior - Option-sensitive shell behavior enums reused by linter facts and rules. Option-sensitive pattern operators available to glob and shell-pattern facts.
- Indexed
Array Reference Fragment - Extracted structural facts available to rules and callers.
- Legacy
Arithmetic Fragment Fact - Extracted structural facts available to rules and callers.
- Linter
Facts - Fact collection types and stable identifiers into those collections.
- Linter
Rule Options - Linter configuration and per-file ignore types. Per-rule behavior overrides applied during lint analysis.
- Linter
Semantic Artifacts - Semantic model plus linter-private traversal artifacts needed to build facts.
- Linter
Settings - Linter configuration and per-file ignore types.
- List
Fact - Extracted structural facts available to rules and callers.
- List
Operator Fact - Extracted structural facts available to rules and callers.
- Loop
Header Word Fact - Extracted structural facts available to rules and callers.
- Native
ZshScalar Array Reference - Extracted structural facts available to rules and callers.
- Normalized
Command - Fact collection types and stable identifiers into those collections.
- Normalized
Declaration - Fact collection types and stable identifiers into those collections.
- PerFile
Ignore - Linter configuration and per-file ignore types.
- Pipeline
Fact - Extracted structural facts available to rules and callers.
- Pipeline
Operator Fact - Extracted structural facts available to rules and callers.
- Pipeline
Segment Fact - Extracted structural facts available to rules and callers.
- Positional
Parameter Fragment Fact - Extracted structural facts available to rules and callers.
- Redirect
Fact - Extracted structural facts available to rules and callers.
- Redirect
Target Analysis - Extracted structural facts available to rules and callers.
- Resolved
Ambient Contracts - Compiled ambient contracts shared by file-entry and plugin-request analysis.
- Resolved
Ambient Request Contracts - Plugin-request contract effects split by imported facts and requesting-file consumption.
- Rule
Metadata - Rule metadata lookup utilities.
- RuleSet
- Sets of enabled or disabled rules.
- Runtime
Literal Analysis - S078
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S078shebang shell policy. - S079
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S079shebang invocation form policy. - S080
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S080script size policy. - S081
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S081file description comments. - S082
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S082TODO-style comment formatting. - S083
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S083missing function documentation. - S084
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S084function documentation content. - S085
Rule Options - Linter configuration and per-file ignore types.
Behavior overrides for
S085main entrypoint analysis. - Script
Line Count Fact - Extracted structural facts available to rules and callers.
- Select
Header Fact - Extracted structural facts available to rules and callers.
- Selector
Required Array Reference - Extracted structural facts available to rules and callers.
- Shell
Check Code Map - Suppression directives, shellcheck mappings, and rewrite helpers. Maps ShellCheck SC codes to Shuck rules.
- Simple
Test Fact - Extracted structural facts available to rules and callers.
- Single
Quoted Fragment Fact - Extracted structural facts available to rules and callers.
- Source
Facts - Fact collection types and stable identifiers into those collections.
- Statement
Fact - Extracted structural facts available to rules and callers.
- Substitution
Fact - Extracted structural facts available to rules and callers.
- Suppression
Directive - Suppression directives, shellcheck mappings, and rewrite helpers. A parsed suppression directive from a comment.
- Suppression
Index - Suppression directives, shellcheck mappings, and rewrite helpers. Per-file suppression index.
- Word
Classification - Word
Facts - Fact collection types and stable identifiers into those collections.
- Word
Occurrence - Word
Occurrence Iter - Word
Occurrence Ref
Enums§
- Ambient
Contract Activation - Contract activation type.
- Applicability
- Autofix types and fix application helpers.
- Arithmetic
Literal Behavior - Option-sensitive shell behavior enums reused by linter facts and rules. How arithmetic number literals are interpreted at a source offset.
- Arithmetic
Literal Kind - Extracted structural facts available to rules and callers.
- Category
- Rule identifiers, categories, and registry lookup helpers.
- Command
Substitution Kind - Command-substitution classification exposed by fact APIs.
- Conditional
Node Fact - Extracted structural facts available to rules and callers.
- Conditional
Operator Family - Extracted structural facts available to rules and callers.
- Declaration
Kind - Fact collection types and stable identifiers into those collections.
- Expansion
Context - Expansion
Value Shape - Field
Splitting Behavior - Option-sensitive shell behavior enums reused by linter facts and rules. Whether unquoted expansion results are subject to field splitting.
- FixAvailability
- Autofix types and fix application helpers.
- Glob
DotBehavior - Option-sensitive shell behavior enums reused by linter facts and rules. Whether glob patterns match dot-prefixed path segments without an explicit dot.
- Glob
Failure Behavior - Option-sensitive shell behavior enums reused by linter facts and rules. How unmatched glob patterns behave.
- Indexed
Array Reference Fragment Fact - Extracted structural facts available to rules and callers.
- Named
Group - Rule selector parsing types.
- Pathname
Expansion Behavior - Option-sensitive shell behavior enums reused by linter facts and rules. Whether pathname expansion applies to literal globs and substitution results.
- Pattern
Operator Behavior - Option-sensitive shell behavior enums reused by linter facts and rules. Whether a zsh pattern-operator family is active.
- Plain
Unindexed Array Reference Fact - Extracted structural facts available to rules and callers.
- Redirect
DevNull Status - Extracted structural facts available to rules and callers.
- Redirect
Target Kind - Extracted structural facts available to rules and callers.
- Rule
- Rule identifiers, categories, and registry lookup helpers.
- Rule
Selector - S083
Function DocRequirement - Linter configuration and per-file ignore types.
Which functions require a leading documentation comment for
S083. - Selector
Parse Error - Severity
- Rule diagnostics and severity levels.
- Shell
Check Level - Rule metadata lookup utilities.
- Shell
Dialect - Shell dialect selection used by the linter.
- Simple
Test Operator Family - Extracted structural facts available to rules and callers.
- Simple
Test Shape - Extracted structural facts available to rules and callers.
- Simple
Test Syntax - Extracted structural facts available to rules and callers.
- Subscript
Index Behavior - Option-sensitive shell behavior enums reused by linter facts and rules. How indexed array subscripts are interpreted at a source offset.
- Substitution
Host Kind - Extracted structural facts available to rules and callers.
- Substitution
Output Intent - Extracted structural facts available to rules and callers.
- Sudo
Family Invoker - Extracted structural facts available to rules and callers.
- Suppression
Action - Suppression directives, shellcheck mappings, and rewrite helpers.
- Suppression
Source - Suppression directives, shellcheck mappings, and rewrite helpers.
- Test
Operand Class - Word
Expansion Kind - Word
Fact Context - Word
Fact Host Kind - Word
Literalness - Word
Quote - Word
Substitution Shape - Wrapper
Kind - Fact collection types and stable identifiers into those collections.
Traits§
- Violation
- Trait implemented by rule-specific diagnostic payloads.
Functions§
- add_
ignores_ to_ path - Suppression directives, shellcheck mappings, and rewrite helpers.
- add_
ignores_ to_ path_ with_ resolvers - Suppression directives, shellcheck mappings, and rewrite helpers.
- analyze
- Builds semantic facts and linter diagnostics for a request.
- apply_
fixes - Autofix types and fix application helpers.
- build_
ignore_ edit_ for_ line - Suppression directives, shellcheck mappings, and rewrite helpers.
- code_
to_ rule - Rule identifiers, categories, and registry lookup helpers.
- leading_
literal_ word_ prefix - lint
- Lints a request and returns diagnostics.
- parse_
directives - Suppression directives, shellcheck mappings, and rewrite helpers. Parse all suppression directive candidates from a file’s comments.
- rule_
metadata - Rule metadata lookup utilities.
- rule_
metadata_ by_ code - Rule metadata lookup utilities.