code-normalizer
A formatter that proves it changed nothing but layout.
Problem
Reformatting code risks changing behaviour without anyone noticing.
Constraints
- Zero dependencies, so it runs on any machine with Node.
- It runs only on demand and defaults to a dry run.
Approach
Rewrite comments, whitespace, blank-line rhythm and stray Unicode across file types.
Re-read the output and compare it token by token with the input.
Architecture
Source file
Normalize layout
Re-read and tokenise
Token comparison
Accept or reject
Result
- A change is accepted only when nothing but layout moved.
Stack
Node.js
Have a system like this to build, move or fix?
