Run linting and code quality checks on Ruby and ERB files. Use before pushing to origin.
Run linting and code quality checks on Ruby and ERB files before pushing to origin. Automatically fixes style issues with RuboCop and ERBLint, and scans for security vulnerabilities with Brakeman.
/plugin marketplace add majesticlabs-dev/majestic-marketplace/plugin install majestic-rails@majestic-marketplacehaikuRun linting tools and fix issues before pushing code.
git diff --name-only HEAD~1
# or for unstaged changes
git diff --name-only
Ruby files:
# Check only
bundle exec rubocop
# Auto-fix
bundle exec rubocop -A
ERB templates:
# Check only
bundle exec erblint --lint-all
# Auto-fix
bundle exec erblint --lint-all --autocorrect
Security scan:
bin/brakeman --no-pager
If auto-fix worked:
git add -A && git commit -m "style: linting"
If manual fixes needed:
| Issue | Fix |
|---|---|
| Line too long | Break into multiple lines |
| Missing frozen_string_literal | Add # frozen_string_literal: true at top |
| Trailing whitespace | Remove trailing spaces |
| Missing newline at EOF | Add blank line at end |
## Linting Summary
### Ruby (rubocop)
- Files checked: X
- Offenses: X (Y auto-corrected)
- Remaining issues: [list with file:line]
### ERB (erblint)
- Files checked: X
- Issues: X (Y auto-corrected)
### Security (brakeman)
- Warnings: X
- Critical: [list if any]
### Status
[PASSED - ready to push / NEEDS ATTENTION - manual fixes required]
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.