Open VincentChataignier opened 6 years ago
For the moment I use $(git --no-pager diff --name-only --diff-filter=MARC| grep -E 'src/|tests/')
to list changed files. I use this git command instead of paths
and that's working.
vendor/bin/phpstan analyse -c phpstan.neon -l 1 $$(git --no-pager diff --name-only --diff-filter=MARC| grep -E 'src/|tests/')
Hello,
thanks for you issue. My question is about application this idea. What benefit it has? Or what is your reason for this change? Parallel-lint is very fast :-)
Thanks
Run PHP-Parallel-Lint only in changed file improve the rapidity in huge project. For example, we have approximately 3700 files to lint, that's working in approximately 150 seconds.
Use cases for --only-git-changed
are for developers who want to check code before commit and push in the CI (Travis, Jenkins ...). That's improve the waiting time during development.
For the moment, we use $(git --no-pager diff --name-only --diff-filter=MARC)
but I think this functionality should be added in library to benefit everyone :smiley:
Okay, I understand to your reasons and it make sense for me.
Can you add PR with test? What do you mean? :-)
I added a new commit about this issue. Can you check it please :smiley: before my PR? I saw the similar issue #75 and my code is inspired by this one.
Hello,
I think we could add the option
--only-git-changed
. This option will force an analysis only on the changed files.This is just an idea. I don't know if this feature is possible for PHP-Parallel-Lint. Library https://github.com/M6Web/Coke does this feature.
Thanks, Best regards,
Vincent Chataignier