mirror of
https://github.com/brazilofmux/tinymux
synced 2026-08-13 00:23:11 -04:00
softcode_lint.py — static analysis of MUX softcode:
Checks:
Balanced brackets [ ], parentheses ( ), braces { }
Known function names (~200 TinyMUX functions)
Valid substitution patterns (%#, %0-%9, %q0-%qz, %va-%vz, etc.)
Dangerous commands (@force, @destroy, @toad, @shutdown, etc.)
Integrated into worldbuilder.py as 'lint' action:
worldbuilder.py lint spec.yaml
Also available standalone:
softcode_lint.py spec.yaml — lint a YAML spec
softcode_lint.py --raw code.txt — lint raw softcode text
Test: softcode_test.yaml exercises all check types
5 errors (unclosed delimiters, dangerous @force)
2 warnings (unknown function, invalid %z substitution)
Town spec with real attributes passes cleanly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7.3 KiB
7.3 KiB