Skip to content

maltAn ultra-fast, extensible linter for MATLAB, written in Rust

Single-pass AST traversal powered by tree-sitter, with 2,680+ MATLAB Code Analyzer checks. Lint thousands of files in milliseconds.

Quick Start ​

bash
# Install (prebuilt wheels on PyPI)
uv tool install malt

# Lint MATLAB files
malt path/to/file.m

# Auto-fix issues
malt --fix path/to/file.m

Example Output ​

text
src/compute.m:2:5 [W] M001: Statement without trailing semicolon may produce unintended console output
src/compute.m:4:5 [W] M001: Statement without trailing semicolon may produce unintended console output

Found 2 issues in 1 file.

Design Principles ​

  • Single-pass traversal — The AST is walked exactly once. Rules subscribe to node types and are dispatched via an O(1) registry lookup.
  • tree-sitter powered — Leverages tree-sitter-matlab for fast, incremental, error-tolerant parsing.
  • Workspace architecture — Separated into malt_core (engine), malt_rules (rule implementations), and malt_cli (interface).
  • Inspired by the best — Architecture modeled after ruff and rumdl.

Next Steps ​

Copyright © 2026 Mark Shui Hu