maxdop

Page Brooks·pagebrooks.maxdop

An opinionated T-SQL formatter that runs in CI and checks its own work.

maxdop formats T-SQL using Microsoft's own parser, ScriptDom — the one behind DacFx and SQL database projects — so it reads stored procedures, GO batches and SQL Server 2000-era syntax the way the server does, rather than guessing from tokens. Every format is re-parsed and compared against the input: token stream, syntax tree and comments. On any mismatch your original file is returned untouched with a distinct exit code, so a formatter bug cannot corrupt your source. Measured across 2,215 real-world files it refused nothing, crashed on nothing, and lost none of their 11,261 comments. It is one static binary with no .NET runtime to install, and the same binary runs in your editor and your build pipeline. Style lives in a .maxdop.json committed next to the code, so a repository formats the same way for everyone who opens it.

winget install --id pagebrooks.maxdop --exact --source winget

Latest 0.1.4·November 5, 2026

Release Notes

No formatting changes. A file formatted by 0.1.3 comes out of 0.1.4 byte for byte the same. This release moves the parser forward and cleans up the toolchain behind it. ScriptDom 180.140.0 maxdop parses with Microsoft's ScriptDom, and the pin moves from 180.102.0 to 180.140.0. The grammar surface grew from 935 to 938 concrete node types, all three from one addition: the Fabric DW grammar's scalar AI functions (AI_SUMMARIZE, AI_CLASSIFY, AI_TRANSLATE and the others) now take an ON ERROR clause — ERROR ON ERROR, NULL ON ERROR or DEFAULT ON ERROR. Those functions exist only under the Fabric DW grammar; under every other grammar the same text is an ordinary function call. maxdop has no layout rule for them and passes the whole expression through as written, so the new clause needed no formatting work. What it got instead is a test: the clause survives the round trip verbatim, inside a statement that still formats around it, and formatting the result again is a fixed point. The parser is the one thing in this release that can change what maxdop sees in a file, so it was checked as such. The corpus sweep against 180.140.0 came back unchanged: nothing refused, nothing crashed, nothing unstable. Toolchain

  • .NET SDK 10.0.403. The release binaries are Native AOT, so the .NET runtime is compiled into them rather than installed beside them. The SDK pin moves from 10.0.302 to 10.0.403, which takes the compiled-in runtime from 10.0.10 to 10.0.14 and with it the fix for CVE-2026-111497, an out-of-bounds write in the runtime's Brotli decoder. maxdop never decodes Brotli, so it was not reachable, but a binary that carries its own runtime should carry a patched one.
  • VS Code extension. ovsx, the tool that publishes the extension to Open VSX, pulled in its own older copy of @vscode/vsce beneath the one the extension already builds with, and with it a dependency under a security advisory. An npm override now resolves ovsx to the top-level vsce, which removes the duplicate tree and the advisory with it. This is build tooling: the extension's own code is unchanged and it has no runtime npm dependencies. Separately, minimatch, which vsce uses to apply .vscodeignore, is overridden to 11.0.1 or later for a denial-of-service advisory (GHSA-g3hv-75wg-m249) that no vsce release has picked up yet.
  • Test toolchain. Mutation testing runs on Stryker.NET 5.0, and the test projects move to Microsoft.NET.Test.Sdk 18.11, coverlet 10.1 and xunit.runner.visualstudio 4.0.1. Pinned, as before, so a mutation score or a coverage number stays comparable with last week's.

Installer type: zip

x64—05A0D54403D5BE88D674FAF635C1C906E86807678268B8B720792034462CE429
arm64—0EB7A6745621A40C2EE61E20D9A83057DA92959919AF7AD002BAB8DD58A62E1A

Details

Homepage
https://github.com/pagebrooks/maxdop
License
MIT
Publisher
Page Brooks
Support
https://github.com/pagebrooks/maxdop/issues
Moniker
maxdop

Tags

clidatabaseformattermssqlsqlsql-serversqlservert-sqltsql

Older versions (2)

0.1.2
x64—55F43288AD3FE0BDB9F354BD6AE3A047B77A0AE87061C927EA6AFFAF89925891
arm64—DF00864615EA93C6BDB134D5DBBD4D597DFF092BC0CD32E53B7462BE730D5F13
0.1.1
x64—608C310656994CFE46A0BF2BBE38CBADB392D81FCA1996017DF150E9495E6219
arm64—024C5DA0843B8AE09CAB5691DE2948EDB651E745D5909D15114DF763B7174484