How koalaman/shellcheck works
ShellCheck is a static analyzer for Bash/sh scripts. The principal workflow is to provide a script, run ShellCheck, and receive warnings or suggestions; documented use includes terminals, editors, and build/test suites. The tree identifies parsing, analysis, checks, and multiple output formatters as internal areas. Since no source excerpts were provided, internal call relationships are not asserted; workflow links below are limited to README-documented behavior.
Main entry points: shellcheck.hs ShellCheck CLI
Components 22
Invocation and API
- ShellCheck CLI
shellcheck.hs - Tool interface
src/ShellCheck/Interface.hs
Script analysis
- Shell parser
src/ShellCheck/Parser.hs - Shell AST
src/ShellCheck/AST.hs - Semantic analyzer
src/ShellCheck/Analyzer.hs - Control-flow graph
src/ShellCheck/CFG.hs - Flow analysis
src/ShellCheck/CFGAnalysis.hs
Diagnostic checks
- Diagnostic checker
src/ShellCheck/Checker.hs - Command checks
src/ShellCheck/Checks/Commands.hs - Control-flow checks
src/ShellCheck/Checks/ControlFlow.hs - Custom checks
src/ShellCheck/Checks/Custom.hs - Shell support checks
src/ShellCheck/Checks/ShellSupport.hs
Reports and fixes
- Fix suggestions
src/ShellCheck/Fixer.hs - Format selection
src/ShellCheck/Formatter/Format.hs - Terminal output
src/ShellCheck/Formatter/TTY.hs - GCC output
src/ShellCheck/Formatter/GCC.hs - JSON output
src/ShellCheck/Formatter/JSON.hs - JSON1 output
src/ShellCheck/Formatter/JSON1.hs - CheckStyle output
src/ShellCheck/Formatter/CheckStyle.hs - Quiet output
src/ShellCheck/Formatter/Quiet.hs - Diff output
src/ShellCheck/Formatter/Diff.hs
Other components
- Script author
Connections 2
- Script author → ShellCheck CLI: runs on script
README.md - ShellCheck CLI → Script author: reports findings
README.md