SattLint is a Python toolkit for SattLine projects. It provides syntax-checking, repository auditing, configurable analysis, DOCX documentation generation, and a language-server protocol entry point.
- Check whether a SattLine file parses correctly
- Analyze a full program or library together with its dependencies
- Find issues such as unused variables, written-but-never-read variables, and shadowing
- Generate DOCX documentation from analyzed programs
- Inspect parser outputs when something looks wrong
- Windows or Linux
- Python 3.13 or newer
- pipx (for clean, isolated installation)
- A local copy of your SattLine code
git clone https://github.com/SorenHJohansen/SattLint.git
cd SattLintpython3 -m pip install --user pipx
python3 -m pipx ensurepathRestart your terminal after this.
py -m pip install --user pipx
py -m pipx ensurepathRestart your terminal after this.
pipx install .This installs SattLint globally in an isolated environment.
sattlint --version
sattlint syntax-check tests/fixtures/sample_sattline_files/SattLineFullGrammarTest.ssattlint syntax-check path/to/Program.sOutput:
OK— valid file- Error message — invalid file
Exit codes:
0— success1— command ran and found a real problem2— invalid arguments or configuration
sattlint syntax-check path/to/Program.s
sattlint analyze
sattlint analyze --list-checks
sattlint validate-config
sattlint format-icf
sattlint format-icf --check
sattlint docgen --output-dir docs-out
sattlint repo-audit --profile quick --fail-on highShared flags for config-driven commands:
sattlint --config path/to/config.toml analyze
sattlint --config path/to/config.toml --no-cache analyze
sattlint --quiet repo-audit --profile quickFor the full command reference, see docs/references/cli-commands.md.
sattlintOpens the Textual interactive terminal UI with the following views:
- Analyze — queue curated reports and additional analyzers
- Documentation — preview unit scope and generate DOCX
- Setup — configure paths, targets, mode, and cache settings
- Tools — run self-checks, inspect dumps, refresh caches
- Help — first-time guidance and workflow explanation
The first time SattLint runs, it creates a config file automatically:
- Windows:
%APPDATA%\sattlint\config.toml - Linux:
~/.config/sattlint/config.toml
-
Start SattLint with
sattlint -
Select Setup
-
Configure the following:
program_dir— your SattLine program folderABB_lib_dir— shared or ABB librariesother_lib_dirs— any additional librariesanalyzed_programs_and_libraries— what to analyzeicf_dir— directory used for ICF validation and formattingEdit graphics rules— define expected module invocation or clipping rules (saved as JSON)
-
Save with Save configuration
-
Select Tools and run Self-check diagnostics
Note: Use names without file extensions (e.g.
MyProgram, notMyProgram.s).
pipx install --force .- Open Setup, then Edit graphics rules to add or update expected invocation coordinates, flags, and clipping-related values
- Use
unit:selectors when a module should look the same in every detected unit (e.g.unit:L1orunit:L1.L2.UnitControl) - Use
equipment:selectors when a module should look the same inside every equipment module (e.g.equipment:L1.L2.EquipModPanelShort) - Open Analyze, then run Validate graphics rules from Structure & modules to report modules that are not to spec
- Open Tools, then run Self-check diagnostics to confirm the graphics rules JSON path is valid
pipx is not on your PATH. Run pipx ensurepath and restart your terminal.
Install Python 3.13+ and reinstall with pipx install --force ..
- Names must not include file extensions
- Paths in config must be correct
- Mode (
official/draft) must match your files
Add missing folders to ABB_lib_dir or other_lib_dirs.
Run Force refresh cached AST from the Tools menu, or use sattlint --no-cache analyze.
See CONTRIBUTING.md for development setup, tests, and tooling.
SattLint is released under the MIT License.