PHP-Parallel-Lint
PHP-Parallel-Lint copied to clipboard
Support only checking the files you changed with the -h option
Fixes #75
@grogy hi, could I have help please? I doint know what to do here?
@paladox hello, I added comments to your commits. It is better now? Or what do you need know? :-)
I'm not sure what I'm doing, just guessing.
@paladox you are in good way.. :+1: I like you that you tried send PR. Together we will finish it. :-)
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 in my opinion is necessary changed (only in your use case) $iterator - you need iterate only in changed files. Do you understand me?
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.
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:
@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?