Fix: format .stub files correctly with pint#28
Conversation
- Temporarily converted `$VAR$` placeholders in `stubs/` to valid PHP format tokens, renamed files to `.php`, ran `vendor/bin/pint`, and reverted placeholders back to their original form. - This ensures the generated files from these templates conform to the codebase style rules without throwing pint errors when run after generation. - Excluded paths like `use $VAR$;` to prevent pint from breaking them. Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Temporarily converted `$VAR$` placeholders in `stubs/` to valid PHP format tokens, renamed files to `.php`, ran `vendor/bin/pint`, and reverted placeholders back to their original form. - This ensures the generated files from these templates conform to the codebase style rules without throwing pint errors when run after generation. - Excluded paths like `use $VAR$;` to prevent pint from breaking them. Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com>
- Temporarily converted `$VAR$` placeholders in `stubs/` to valid PHP format tokens, renamed files to `.php`, ran `vendor/bin/pint`, and reverted placeholders back to their original form. - Passed custom config `pint.json` to pint with `no_superfluous_phpdoc_tags` and `single_line_empty_body` rules set to false to prevent pint from removing the original template empty methods and docblocks. - Preserved `use $VAR$;` imports by protecting them from format erasure, preventing pint from deleting or garbling namespaces in controllers. - This ensures generated files from templates conform to codebase style rules without throwing errors. Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com>
Fixes an issue where
pintformatting would fail or produce incorrectly formatted files when running commands that generated code from.stubfiles. Formatted the.stubfiles withpintby first swapping template variables to valid PHP strings, lettingpintrun, and replacing the original templates back.PR created automatically by Jules for task 12349054718455313398 started by @juzaweb