From 80a35c566755691fbca4b5a0e011c89d25c6f0f6 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 25 Jul 2025 09:32:28 -0500 Subject: [PATCH] Update CLAUDE.md to emphasize formatting before commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Made it CRITICAL to always run mix format BEFORE committing - Added Pre-Commit Checklist section with step-by-step process - Emphasized this is non-negotiable to maintain code consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 20985ea..7f60934 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -36,7 +36,7 @@ This is an Elixir Phoenix LiveView application that serves as a real-time APRS ( - `mix credo` - Static code analysis and style checking - `mix dialyzer` - Static type analysis (must run and fix errors/warnings) - `mix sobelow` - Security vulnerability scanning -- **IMPORTANT**: Always run `mix format` before considering any task complete +- **CRITICAL**: ALWAYS run `mix format` BEFORE committing - never commit unformatted code - **MANDATORY**: Run `mix compile --warnings-as-errors` and ensure it passes before considering any task complete ### Assets (No Node.js) @@ -99,13 +99,19 @@ Tests use comprehensive mocking to prevent external connections: - Use LiveView for UI interactions, minimize JavaScript - Prefer pattern matching over if/case statements - Follow idiomatic Elixir conventions -- Run `mix format` before committing +- **CRITICAL**: ALWAYS run `mix format` BEFORE committing - this is non-negotiable - Address any compiler warnings - Run `mix dialyzer` and fix all errors/warnings - **MANDATORY**: Run `mix compile --warnings-as-errors` and ensure it passes before considering any task complete - Use function composition over nested conditionals - Write descriptive test names that explain behavior +### Pre-Commit Checklist +1. Run `mix format` - ALWAYS do this first +2. Run `mix compile --warnings-as-errors` - ensure no warnings +3. Run `mix test` - ensure all tests pass +4. Only then commit and push your changes + ## Web Testing - **MANDATORY**: When viewing any website or web application, always use Puppeteer to take screenshots and interact with the page