laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.
https://laravel.com/docs/pint
MIT License
2.78k stars 144 forks source link

issue stages all project files with no changes #243

Closed redhabenz closed 8 months ago

redhabenz commented 9 months ago

Pint Version

1.13.8

PHP Version

8.2.4

Description

i'm having issue with runing pint in vscode im using the latest laravel 10.40

Steps To Reproduce

when i run the commande ./vendor/bin/pint it add all my projects files as changes when i check them there's no change on the file. why is that ? also is there a possible config to check only the file that i have worked on not all the project ?

Jubeki commented 8 months ago

You can use

vendor/bin/pint --dirty

to only format files which were changed. See https://laravel.com/docs/10.x/pint#running-pint

Also files marked as changed, can happen if you for example have some kind of other command which your run before pint, which will change something in the files, which will then be formatted with pint. Though I can't say for sure that is the reason in your case.

redhabenz commented 8 months ago

You can use

vendor/bin/pint --dirty

to only format files which were changed. See https://laravel.com/docs/10.x/pint#running-pint

Also files marked as changed, can happen if you for example have some kind of other command which your run before pint, which will change something in the files, which will then be formatted with pint. Though I can't say for sure that is the reason in your case.

im just runing pint as commande for formatting i checked most of files theres no changes or formatting happens are just in changes section without any change i will try the --dirty