dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 439 forks source link

Php parallel lint extensions #1290

Closed richardjh closed 7 years ago

richardjh commented 7 years ago

Contribution Type: new feature Link to Intent to Implement: Link to Bug:

This pull request affects the following areas:

In raising this pull request, I confirm the following (please check boxes):

Detailed description of change:

php_parallel_lint allows you to pass in a comma separated list of extensions to check but the PhpParallelLint plugin does not allow you to pass this to the command. It looks like the intention was to use a regexp option to do this, but it is not implemented and the regexp option is not used.

The changes in this pull request remove the regexp option (as it is unused) and allow you to set an extensions option in phpci.yml for the PhpParallelLint plugin.

Example

php_parallel_lint:
    extensions: php, html

If the option is set to a comma delimited list of strings, it will pass that string through to the underlying php_parallel_lint command as a list of file extension to use. If the option is not set, or is not comma delimited strings, it will default to use php to preserve existing behaviour.

This is required for anyone that has php code in files with extensions other than php. This commonly occurs in templates where the file contains php but the extension is often .html, .phtml or .tpl