-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
The mojo-best-practices/patterns/testing.md file is missing instructions on running mojo format before committing changes. Without this, contributors may commit unformatted code that causes linter failures in CI.
Proposed Change
Add a "Before Committing: Run the Formatter" section to testing.md (after the existing "Running Tests" section) with the following content:
## Before Committing: Run the Formatter
Always run `mojo format` before committing changes to ensure the linter passes in CI:
\`\`\`bash
# Format a single file
mojo format my_module.mojo
# Format all Mojo files in the current directory (recursive)
mojo format .
# Format a specific directory
mojo format src/
\`\`\`
> **Important:** `mojo format` enforces the official Mojo style (indentation, spacing, trailing commas, etc.). Committing unformatted code will cause linter failures in CI. Make this a habit before every commit, or configure your editor to run it on save.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels