Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Conformal - MATLAB Shape AnalyzerNew to Visual Studio Code? Get it now.
Conformal - MATLAB Shape Analyzer

Conformal - MATLAB Shape Analyzer

Ethan Doughty

|
3 installs
| (0) | Free
Static shape and dimension analysis for MATLAB. Catch matrix dimension errors before runtime. No MATLAB license required.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Conformal: MATLAB Shape Analyzer

Static shape and dimension analysis for MATLAB. No MATLAB license required.

Conformal finds matrix dimension errors before you run your code. If A is 3x4 and B is 5x2, it can tell you that A * B has an inner dimension mismatch, and that [A; B] has mismatched column counts. It tracks symbolic dimensions like n, m, and n+m through assignments, function calls, control flow, and across sibling .m files in the same directory.

What it catches

Most of what it catches comes down to dimension mismatches, whether that's in multiplication, concatenation, element-wise operations, or backslash solves. It can also flag type errors when you use structs or cells where numbers are expected, and it checks for index out of bounds, division by zero, and negative dimensions when it can prove them from the code. It follows shapes through user-defined functions (including pre-2016 end-less definitions and no-arg procedures), anonymous functions with closure capture, and cross-file calls to sibling .m files.

In the editor

Diagnostics show up as underlines as you type, and you can hover any variable to see its inferred shape (matrix[3 x n]). If you use * where .* was probably intended, or && where & should be, it suggests the fix. Function definitions appear in the sidebar and breadcrumbs, and the status bar shows warning counts. The extension registers its own MATLAB grammar, so you don't need the MathWorks extension.

The analyzer handles most files in under 100ms, so real-time analysis is on by default with a 500ms debounce. A 700-line file with 36 warnings takes about 99ms, and cross-file workspace analysis runs in under 70ms. There's no MATLAB runtime involved.

Install

Search "Conformal" in VS Code Extensions, or run:

code --install-extension EthanDoughty.conformal

On first activation, the extension creates a Python venv, installs its dependencies, and uses the bundled analyzer. You shouldn't need to configure anything.

Requires Python 3.10+.

How it works

The extension runs python3 -m lsp as an LSP subprocess over stdio. The server analyzes your .m files and publishes diagnostics back to the editor. When you save a file, it re-analyzes siblings that might depend on it. If the server crashes, it can auto-recover up to 3 times.

Under the hood, there are 128 builtin shape rules (200+ recognized builtins total), symbolic dimension tracking, constraint solving, interval analysis, and fixed-point loop convergence, all validated by 312 tests across 16 categories. The parser has been tested against 38 .m files drawn from real open-source MATLAB repos, covering robotics, signal processing, and scientific computing, and produces zero warnings on all of them in default mode.

Commands

Command What it does
Conformal: Analyze Current File Save and re-analyze
Conformal: Toggle Fixpoint Mode Fixed-point loop analysis
Conformal: Toggle Strict Mode Show all warnings including informational and low-confidence diagnostics
Conformal: Restart Server Restart the LSP server

Settings

Setting Default Description
conformal.pythonPath python3 Leave default for auto-setup
conformal.serverPath (empty) Dev use only
conformal.fixpoint false Fixed-point loop analysis
conformal.strict false Show all warnings including informational and low-confidence diagnostics
conformal.analyzeOnChange true Keystroke analysis, 500ms debounce

VS Code Marketplace · GitHub

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft