Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if --dirty flag is passed for pint and pass files changed as argument for pint #572

Closed

Conversation

maskeynihal
Copy link

This PR relates to laravel/pint#169

Currently, when running pint from sail with --dirty flag, the pint doesn't work as the container is not a git repo.

In this PR, I have checked if the --dirty argument is passed and if it's passed, the list of files changed will be passed as an argument to pint rather.

Without the flag --dirty it works without any change.
image

With the flag --dirty it will update the files only those that are modified.
image

These are the files changed shown by git status --short -- '**.php'
image

In the previous script, passing --dirty flag make no changes in the files
image

NOTE ⚠️

The excluding files config of pint.json will not be respected for now because pint ignores these configs when a file path argument is passed.

bin/sail Fixed Show fixed Hide fixed
bin/sail Fixed Show fixed Hide fixed
bin/sail Fixed Show fixed Hide fixed
bin/sail Fixed Show fixed Hide fixed
@maskeynihal
Copy link
Author

@driesvints Would you be able to spare some time to go over the pull request?

@maskeynihal maskeynihal force-pushed the support-for-flag-dirty-for-pint branch from ee5c525 to fd90281 Compare April 12, 2023 07:39
@maskeynihal maskeynihal changed the title check if --dirty flag is passed for pint and pass files changed as arggument for pint check if --dirty flag is passed for pint and pass files changed as argument for pint Apr 12, 2023
@taylorotwell
Copy link
Member

No plans to add this right now.

@maskeynihal
Copy link
Author

@taylorotwell , --dirty doesn't work with sail for pint right now. laravel/pint#169

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.

None yet

2 participants