Use `php-parallel-lint/php-parallel-lint` for php linting
Suggestion: use php-parallel-lint/php-parallel-lint for php linting
Thanks for the suggestion, @simonschaufi!
I've just run the non-parallel PHP lint of my seminars extension with ~120k lines of PHP: PHP-linting all files takes ~2.0 seconds on my (fat) 2021 desktop machine and ~2.5 seconds on my ~2020 Thinkpad when it's running on battery. (Both numbers are fore the second run so the files are already cached.)
Those numbers are "good enough" for me, and I'm not sure having the better performance from parallelizing the linting would warrant the added complexity and the additional tool.
Do you have different numbers, @simonschaufi, or am I missing something here?
The amount of php files is so small in the tea extension that you can't really see a big difference. On a huge extension that I have with 479 files, it makes a massive difference:
tea way:
real 0m8,273s
user 0m22,092s
sys 0m10,683s
parallel:
real 0m1,066s
user 0m3,122s
sys 0m2,634s
@simonschaufi Out pure curiosity, how big is your extension (in terms of lines of code)?
Huge! It's a whole shop application.
https://mattstauffer.com/blog/how-to-count-the-number-of-lines-of-code-in-a-php-project/
phploc 7.0.2 by Sebastian Bergmann.
Directories 75
Files 480
Size
Lines of Code (LOC) 91137
Comment Lines of Code (CLOC) 20918 (22.95%)
Non-Comment Lines of Code (NCLOC) 70219 (77.05%)
Logical Lines of Code (LLOC) 17058 (18.72%)
We've just talked about this on our team call: Yes, we'd love to have this!