You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be highly beneficial if Peck could integrate with Laravel's php artisan make commands to perform automatic grammar and spelling checks before generating new files. This feature would help ensure that newly created files have consistent and error-free naming conventions, improving the overall quality of the codebase.
Proposed Implementation
Hook into Laravel's php artisan make commands.
Execute vendor/bin/peck check to validate names and strings (e.g., file names, class names, namespaces, etc.) before generating files.
If issues are detected, provide the user with:
A warning or error message indicating the detected problems.
The option to either correct the issues or bypass the checks (e.g., --force flag).
Example Workflow
Developer runs: php artisan make:controller ExampleCntroller
Peck validates the name ExampleCntroller:
Detects a typo. Returns an error: Detected possible typo in 'ExampleCntroller'. Did you mean 'ExampleController'?
Halts the file creation process until the issue is resolved or bypassed.
Benefits
Ensures consistent and grammatically correct naming conventions in newly created files.
Reduces technical debt by catching potential typos and errors early in the development process.
Encourages best practices across the team.
The text was updated successfully, but these errors were encountered:
Yusup-beep
changed the title
Add automatic grammar checking to php artisan make commands
Add automatic checking to php artisan make commands
Dec 28, 2024
This is a very valid Idea! Attack the problem at the root instead of after everything was created 👍🏼
However, I am unsure, if this isn't perhaps a topic for the GenerateCommand in Laravel itself.
Description
It would be highly beneficial if Peck could integrate with Laravel's php artisan make commands to perform automatic grammar and spelling checks before generating new files. This feature would help ensure that newly created files have consistent and error-free naming conventions, improving the overall quality of the codebase.
Proposed Implementation
Hook into Laravel's php artisan make commands.
Execute vendor/bin/peck check to validate names and strings (e.g., file names, class names, namespaces, etc.) before generating files.
If issues are detected, provide the user with:
A warning or error message indicating the detected problems.
The option to either correct the issues or bypass the checks (e.g., --force flag).
Example Workflow
Developer runs:
php artisan make:controller ExampleCntroller
Peck validates the name ExampleCntroller:
Detects a typo.
Returns an error: Detected possible typo in 'ExampleCntroller'. Did you mean 'ExampleController'?
Halts the file creation process until the issue is resolved or bypassed.
Benefits
Ensures consistent and grammatically correct naming conventions in newly created files.
Reduces technical debt by catching potential typos and errors early in the development process.
Encourages best practices across the team.
The text was updated successfully, but these errors were encountered: