PHP-Parallel-Lint icon indicating copy to clipboard operation
PHP-Parallel-Lint copied to clipboard

Support only checking the files you changed with the -h option

Open paladox opened this issue 9 years ago • 9 comments

Fixes #75

paladox avatar Sep 09 '16 13:09 paladox

@grogy hi, could I have help please? I doint know what to do here?

paladox avatar Sep 09 '16 15:09 paladox

@paladox hello, I added comments to your commits. It is better now? Or what do you need know? :-)

grogy avatar Sep 10 '16 13:09 grogy

I'm not sure what I'm doing, just guessing.

paladox avatar Sep 10 '16 13:09 paladox

@paladox you are in good way.. :+1: I like you that you tried send PR. Together we will finish it. :-)

grogy avatar Sep 10 '16 13:09 grogy

Ok thank. I'm not sure what the next part is now, how do I get head to be checked first and then the files checked after?

and thanks for helping me

paladox avatar Sep 10 '16 13:09 paladox

@paladox in my opinion is necessary changed (only in your use case) $iterator - you need iterate only in changed files. Do you understand me?

grogy avatar Sep 12 '16 21:09 grogy

I don't think this is something PHPLint should be trying to solve, there too many moving underlying parts which would make this feature complicated and unreliable.

Also from the usecase point of view, I don't think this is something a separate tool should be trying to implement. Usually there are more different tools - coding standards, static analysis, ... and most of them can be "optimized" by checking only the changed files (at least all the tools where you need to work with single files only). So it makes sense to build the list only once and then give it to the separate tools. In this way all the tools will be analyzing exactly the same input, not relying on the implementation of the detection of each one of these. This can be achieved by reading the files from params, read them from input (which is supported), or if this is not enough maybe implement reading the file list from a file.

VasekPurchart avatar Oct 10 '16 14:10 VasekPurchart

i think the tool should accept filenames to process from commandline, then you are free to customize as you like. git diff --name-only --diff-filter=..., for example:

PHP-CS-Fixer/README.rst#using-php-cs-fixer-on-ci

glensc avatar Oct 10 '16 17:10 glensc

@paladox Sorry, but I don't think this will be ever merged. Because now it does not support Windows, it is Git only and the same behavior can be easily replaced with this command:

git show HEAD --name-only --no-commit-id --pretty="" | ./parallel-lint --stdin

Or I am wrong?

JakubOnderka avatar Oct 27 '16 15:10 JakubOnderka