Closed reedy closed 7 years ago
Hmmm, I just noticed that https://github.com/JakubOnderka/PHP-Parallel-Lint/blob/master/src/Settings.php#L72 says "Dont't check files or directories"... Is this a typo on the documentation, and it shouldn't say files too? Or is the --exclude public facing documentation (plus in the README) wrong and it should mention files too?
Yeah, looks like it does only excludes directories for now, so #84 to fix the comment. I presume it's a partial copy from files above
I think file excludion works, for me this command works in this repository
./parallel-lint --exclude tests/examples/example-04/dir1/dir2/index.php .
Can you please me provide your command and operation system, which you use?
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/vendor$ php ~/PHP-Parallel-Lint/parallel-lint.php --exclude autoload_static.php composer
PHP 7.0.8 | 10 parallel jobs
................ 16/16 (100 %)
Checked 16 files in 0.4 seconds
No syntax error found
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/vendor$ php ~/PHP-Parallel-Lint/parallel-lint.php composer
PHP 7.0.8 | 10 parallel jobs
................ 16/16 (100 %)
Checked 16 files in 0.4 seconds
No syntax error found
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/vendor/composer$ tree | grep -c php$
16
If it's actually excluding a file, why is the checked file count the same? It should be excluding 1 file, meaning 15 files were checked?
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/vendor/composer$ php --version
PHP 7.0.8-3ubuntu3 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.8-3ubuntu3, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/vendor/composer$ uname -a
Linux ubuntu64-web-esxi 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
reedy@ubuntu64-web-esxi:~/PHP-Parallel-Lint$ git rev-parse HEAD
c87e2531d9a9ec7348836b8df98a162ea82a0985
I also note, as above, if it did work...
--exclude Exclude directory. If you want exclude multiple directories, use
multiple exclude parameters.
is wrong :)
Can you please try to set exclude path relative to CWD and not to test directory?
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/vendor$ php ~/PHP-Parallel-Lint/parallel-lint.php --exclude composer/autoload_static.php composer
Aha, that makes sense then. Thanks
I'm sure I tried that originally, but seemingly not....
Can we get the public facing docs for --exclude updated to say it works on files then? 👍
Can we get the public facing docs for --exclude updated to say it works on files then? 👍
Of course! May you send a pull request? If not, I change it.
Would it be possible to add an exclude-file option, in the same way that there is an exclude(-dir) option already?
And/or could the exclude option be improved to ignore specific files if passed as a parameter?