|
1 | | -# codebuddy |
| 1 | +# CodeBuddy |
| 2 | + |
| 3 | +## All-in-One Code Quality Tool for Laravel |
| 4 | + |
| 5 | +> **Note:** This package is currently compatible only with the Laravel framework. |
| 6 | +
|
| 7 | +## About |
| 8 | +CodeBuddy is a wrapper around essential development tools that help maintain code quality in your Laravel projects. It integrates: |
| 9 | + |
| 10 | +- **Rector** (automated code refactoring) |
| 11 | +- **Pint** (code styling) |
| 12 | +- **PHPStan** (static analysis) |
| 13 | +- **PestPHP** (testing framework) |
| 14 | + |
| 15 | +## Features |
| 16 | +- One command setup for essential tools. |
| 17 | +- CI/CD optimized validation. |
| 18 | +- Automated fixes for coding standards. |
| 19 | +- Code health reporting with email support. |
| 20 | + |
| 21 | +## Commands |
| 22 | + |
| 23 | +### Configure Code Quality Tools |
| 24 | +```sh |
| 25 | +php artisan codebuddy:configure |
| 26 | +``` |
| 27 | +This command sets up **Rector, PestPHP, Pint, and PHPStan** with standard configurations. |
| 28 | + |
| 29 | +### Run CI Checks |
| 30 | +```sh |
| 31 | +php artisan codebuddy:ci [--fix] |
| 32 | +``` |
| 33 | +Runs tests, performs static analysis, and checks code style in a **dry-run mode** (does not modify files). Optimized for CI/CD pipelines. |
| 34 | + |
| 35 | +- `--fix`: Automatically applies fixes for Rector and Pint where possible. |
| 36 | + |
| 37 | +### Generate Code Quality Report |
| 38 | +```sh |
| 39 | +php artisan codebuddy:report [--show|--send-to=<email>] |
| 40 | +``` |
| 41 | +- `--show`: Displays the overall code health report in the console. |
| 42 | +- `--send-to=<email>`: Sends the report to the specified email address. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +This package simplifies code quality enforcement, making it easier to maintain a high standard across your Laravel projects. |
0 commit comments