Skip to content

Commit 247867d

Browse files
dadachiclaude
andcommitted
Add code quality checks section to CLAUDE.md
- Document requirement to fix lint errors (RuboCop) before committing - Document requirement to fix security issues (Brakeman) before committing - Add pre-commit checklist with RuboCop, Brakeman, and test requirements - Include commands and auto-fix instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 58a40ec commit 247867d

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,39 @@ bin/rails dbconsole # Database console
107107
- Web server: `bin/render-start.sh`
108108
- Background workers: `bin/render-start-sidekiq.sh`
109109

110+
## Code Quality Checks Before Committing
111+
112+
**IMPORTANT**: Always run these checks and fix all errors before committing code:
113+
114+
### 1. Lint Errors (RuboCop)
115+
```bash
116+
bin/rubocop
117+
```
118+
- Fix all RuboCop offenses before committing
119+
- Run `bin/rubocop -a` to auto-correct safe offenses
120+
- Review and manually fix remaining issues
121+
122+
### 2. Security Scan (Brakeman)
123+
```bash
124+
bin/brakeman
125+
```
126+
- Fix all security vulnerabilities before committing
127+
- Review warnings and address potential security issues
128+
- Never commit code with security vulnerabilities
129+
130+
### 3. Run Tests
131+
```bash
132+
bin/rails test
133+
```
134+
- Ensure all tests pass before committing
135+
- Add tests for new features or bug fixes
136+
137+
### Pre-Commit Checklist
138+
- [ ] `bin/rubocop` - No lint errors
139+
- [ ] `bin/brakeman` - No security issues
140+
- [ ] `bin/rails test` - All tests passing
141+
- [ ] Code reviewed for quality and security
142+
110143
## Common Development Tasks
111144

112145
### Creating New API Endpoints

0 commit comments

Comments
 (0)