Skip to content

Conversation

@N1ebieski
Copy link
Contributor

@N1ebieski N1ebieski commented Dec 24, 2025

Fix #517

When a user has pint.runOnSave enabled and saves the current file, the extension uses: vendor/bin/pint path/to/the/file.php. When we add a specific file to the command, then Pint ignores the exclude configuration even if this specific file (or its path) is listed in the pint.json config file.

It's a Pint issue, but we can handle it in the extension before executing the command.

This PR adds support for all Pint "excluding" configs: https://laravel.com/docs/12.x/pint#excluding-files-or-folders

@TitasGailius
Copy link
Collaborator

@N1ebieski thanks for the contribution!

I made one small change: we now exclude files only for auto-save runs. If a user explicitly runs Pint on a specific file, they can still do that even if it's excluded in pint.json. This matches Pint's default behavior.

@TitasGailius TitasGailius merged commit 14c12f1 into laravel:main Dec 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Exclude not working when format on save

2 participants