Summary
Add nova fmt command to format Nova source code.
Motivation
Consistent code formatting is essential for:
- Readable codebases
- Reduced bikeshedding in code reviews
- AI-generated code that matches project style
Proposed Implementation
# Format a file
$ nova fmt src/main.nova
# Format and check (CI mode)
$ nova fmt --check src/
# Format with diff output
$ nova fmt --diff src/main.nova
Formatting Rules
- 4-space indentation
- 100 character line limit
- Trailing newline
- No trailing whitespace
- Consistent brace style
Acceptance Criteria
Summary
Add
nova fmtcommand to format Nova source code.Motivation
Consistent code formatting is essential for:
Proposed Implementation
Formatting Rules
Acceptance Criteria
nova fmt <file>formats in placenova fmt --checkreturns non-zero on unformatted codenova fmt --diffshows changes without applying