SattLint is a Python toolkit for SattLine projects. It can syntax-check individual files, audit repository health, run deeper analysis, generate DOCX documentation, and expose a language-server entrypoint.
- Stable on Windows and Linux:
sattlint --version,sattlint syntax-check,sattlint repo-audit, andsattlint-lsp - Preview: the interactive CLI menu, config-driven analysis and documentation workflows, and the local VS Code client in vscode/sattline-vscode
- Internal-only: AI coordination files, generated audit artifacts, and maintainer automation
For the full contract, see the public support matrix. For help and issue routing, see SUPPORT.md. For vulnerabilities, see SECURITY.md. For contributor expectations, see CODE_OF_CONDUCT.md. For development setup, see CONTRIBUTING.md.
Public docs now start at docs/public/README.md. Maintainer docs now start at docs/maintainers/README.md.
The current public branch is still installed from source. To evaluate it today:
- Clone or download this repository.
- Install
pipx. - Run
pipx install .from the repository root. - Verify the install with
sattlint --version. - Run
sattlint syntax-check tests/fixtures/sample_sattline_files/SattLineFullGrammarTest.s.
For AI contributors and maintainers, start here:
AGENTS.md.ai/README.mddocs/maintainers/README.mddocs/maintainers/repo-map.mddocs/public/architecture.mddocs/maintainers/quality-gates.md
For repository operations, keep to the smallest stable set:
python scripts/context_health.py --checkpython -m pre_commit run --all-filessattlint-repo-audit --profile full --check-my-changes --output-dir artifacts/audit
Use sattlint-repo-audit --profile full --check-my-changes --output-dir artifacts/audit for AI post-change drift checks.
Use sattlint-repo-audit --profile full --output-dir artifacts/audit for the full local pre-push, CI, or nightly pass.
Use python scripts/repo_health.py --check --audit-dir artifacts/audit when you need a dashboard from current audit artifacts.
.github/hooks/ai-edit-gate.json still enforces extra post-edit checks for AI-touched files.
In VS Code, the workspace also recommends wanderleyferreiradealbuquerque.context-optimizer.
Use @context-optimizer /audit before widening into large AI control files.
SattLint can help you:
- 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 FS-style Word documentation as a
.docxfile - inspect parser outputs when something looks wrong
- Windows or Linux for the stable public command surface
- Python 3.13 or newer
- pipx (used to install and run SattLint cleanly)
- macOS only on a contributor best-effort basis for now
- A local copy of your SattLine code
Clone the repository:
git clone https://github.com/SorenHJohansen/SattLint.git
cd SattLintIf you prefer not to use Git, download the repository ZIP from GitHub and extract it to a working folder first.
python3 -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.
Open a terminal in the repository root and run:
pipx install .This installs SattLint globally but in an isolated environment, so you can run it from anywhere.
sattlint --version
sattlint syntax-check tests/fixtures/sample_sattline_files/SattLineFullGrammarTest.ssattlintThat opens the Textual interactive shell. The shell and other config-driven workflows are preview surfaces in the current public contract.
For non-interactive use, SattLint also exposes subcommands:
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 --config path/to/config.toml validate-config
sattlint --quiet repo-audit --profile quickFor the full command surface and script entry points, see docs/references/cli-commands.md.
For contributor-only dashboards and maintainer workflow notes, see docs/maintainers/quality-gates.md and AGENTS.md.
If you installed from a source checkout:
- Update your local checkout.
- Run:
pipx install --force .When the published package becomes available, installed releases should use pipx upgrade sattlint instead.
The first time SattLint runs, it creates a config file automatically.
-
Windows:
%APPDATA%\sattlint\config.toml -
Linux:
~/.config/sattlint/config.toml
-
Start SattLint
-
Choose
3) Setup -
Set:
program_dir-> your SattLine program folderABB_lib_dir-> shared or ABB librariesother_lib_dirs-> any additional librariesanalyzed_programs_and_libraries-> what to analyze- Optional advanced key in
config.toml:include_reverse_library_consumers = truewhen a library analysis needs reverse-consumer context from other configured libraries that reference the selected library target. Leave it off unless you specifically need that wider dependency view because it expands analysis scope and can increase load time. 10) Change icf_dir-> directory used for ICF validation and formatting12) Edit graphics rules-> define expected module invocation or clipping rules saved in JSON
-
Save with
9) Save configuration -
Choose
4) Tools -
Run
1) Self-check diagnostics
Important: Use names without file extensions
MyProgramMyProgram.s
Start SattLint:
sattlintOr run a specific automation command:
sattlint syntax-check FILE
sattlint analyze
sattlint format-icf
sattlint validate-configsyntax-check and repo-audit are part of the current stable contract. The Textual interactive shell, analysis, formatting, validation, and DOCX-generation workflows remain preview surfaces.
In the preview Python validation APIs, module-code semantic StructuralValidationError failures have one explicit downgrade path: validate_transformed_basepicture_locally() reports them as ValidationNotice warnings through warning_sink, and validate_transformed_basepicture(..., suppress_module_code_semantic_errors=True) opts into the same downgrade. sattlint syntax-check remains strict.
Textual shell views:
Analyze-> queue curated reports and additional analyzers from the plannerDocumentation-> preview unit scope and generate Word docsSetup-> change paths, targets, mode, and cache settingsTools-> run self-checks, inspect dumps, refresh caches, and open targeted tracing toolsHelp-> first-time guidance and workflow explanations
Inside Analyze, use the planner for a broad pass first, then add focused reports when you need a narrower follow-up.
Graphics layout specification workflow:
- Open
Setup, then useEdit graphics rulesto add or update expected invocation coordinates, invocation flags, and clipping-related values - Use
unit:selectors when a module should look the same in every detected unit, for exampleunit:L1orunit:L1.L2.UnitControl - Use
equipment:selectors when a module should look the same inside every equipment module, for exampleequipment:L1.L2.EquipModPanelShort - Exact relative paths are still available for one-off cases, but the normalized
unit:andequipment:selectors avoid hardcoding unit names such asApplTankor equipment-module names such asEmpty - Moduletype rules still identify modules by resolved
ModuleTypename and can optionally be narrowed withunit:,equipment:, or exact-path selectors - Open
Analyze, then runValidate graphics rulesfromStructure & modulesto report modules that are not to spec - Open
Tools, then runSelf-check diagnosticsto confirm the graphics rules JSON path and whether the file is valid
sattlint syntax-check /path/to/Program.ssyntax-check also accepts .g and .y graphics files and validates literal PictureDisplay targets. When you validate a .s or .x source file, SattLint also checks the matching graphics sidecar when present: official mode uses .y, while draft-mode lookup prefers .g and falls back to .y.
Output:
OK-> valid file- Error message -> invalid file
Exit codes:
0-> success1-> command ran and found a real problem in the input or repository2-> invalid arguments or invalid configuration input
- View Results: Auto-switches to Results view with formatted output
- Generate Docs: Switch to Documentation view and click "Generate DOCX"
- Sidebar: Click view names to switch between Analyze, Config, Docs, Tools, and Results
- Buttons: Click action buttons to start tasks (no right-click menu)
- History: Click history entries in Results view to see details
- Scrolling: All text areas support scrollbars
The status bar at the bottom shows current action and task progress (e.g., "Self-check running...", "Documentation generation finished").
If you are unsure where to start:
- Open
Help - Follow the first-run checklist shown there
- Use
sattlint syntax-check /path/to/Program.swhen you only want to validate one file quickly
pipx is not on your PATH.
Fix:
pipx ensurepathRestart terminal.
Install Python 3.13+ and reinstall:
pipx install --force .Check:
- Names have no extensions
- Paths in config are correct
- Mode (
official/draft) matches files
Add missing folders to:
ABB_lib_dirother_lib_dirs
Run:
6) Force refresh cached AST
You can usually just run:
sattlintThis README is focused on usage.
For development setup, tests, and tooling, see:
CONTRIBUTING.md
SattLint is released under the MIT License.