Run code sniffer on full tests directory, merge commands into one
[MAILPOET-2429]
This commit is contained in:
committed by
Jack Kitterhing
parent
112273e3e6
commit
e1132f9e92
50
RoboFile.php
50
RoboFile.php
@@ -345,28 +345,38 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function qaCodeSniffer($severity='errors') {
|
function qaCodeSniffer($severity='errors') {
|
||||||
if ($severity === 'all') {
|
$severityFlag = $severity === 'all' ? '-w' : '-n';
|
||||||
$severityFlag = '-w';
|
$task = implode(' ', [
|
||||||
} else {
|
'./tasks/code_sniffer/vendor/bin/phpcs',
|
||||||
$severityFlag = '-n';
|
'--extensions=php',
|
||||||
}
|
$severityFlag,
|
||||||
|
'--standard=tasks/code_sniffer/MailPoet',
|
||||||
|
]);
|
||||||
|
|
||||||
return $this->collectionBuilder()
|
return $this->collectionBuilder()
|
||||||
->taskExec(
|
|
||||||
'./tasks/code_sniffer/vendor/bin/phpcs ' .
|
// PHP >= 5.6 for lib & tests
|
||||||
'--standard=./tasks/code_sniffer/MailPoet ' .
|
->taskExec($task)
|
||||||
'--runtime-set testVersion 5.6-7.3 ' .
|
->rawArg('--runtime-set testVersion 5.6-7.3')
|
||||||
'--ignore=./lib/Util/Sudzy/*,./lib/Util/CSS.php,./lib/Util/XLSXWriter.php,' .
|
->arg('--ignore=' . implode(',', [
|
||||||
'./lib/Util/pQuery/*,./lib/Config/PopulatorData/Templates/* ' .
|
'lib/Config/PopulatorData/Templates',
|
||||||
'lib/ ' .
|
'lib/Util/CSS.php',
|
||||||
$severityFlag
|
'lib/Util/Sudzy',
|
||||||
|
'lib/Util/pQuery',
|
||||||
|
'lib/Util/XLSXWriter.php',
|
||||||
|
'tests/_data',
|
||||||
|
'tests/_output',
|
||||||
|
'tests/_support',
|
||||||
|
'tests/Actions.php',
|
||||||
|
'tests/integration/_bootstrap.php',
|
||||||
|
'tests/integration/_fixtures.php',
|
||||||
|
'tests/unit/_bootstrap.php',
|
||||||
|
])
|
||||||
)
|
)
|
||||||
->taskExec(
|
->args([
|
||||||
'./tasks/code_sniffer/vendor/bin/phpcs ' .
|
'lib',
|
||||||
'--standard=./tasks/code_sniffer/MailPoet ' .
|
'tests',
|
||||||
'--runtime-set testVersion 5.6-7.3 ' .
|
])
|
||||||
'--ignore=./tests/unit/_bootstrap.php,./tests/unit/_fixtures.php,./tests/integration/_bootstrap.php,./tests/integration/_fixtures.php ' .
|
|
||||||
'tests/unit tests/integration tests/acceptance tests/DataFactories ' .
|
|
||||||
$severityFlag
|
|
||||||
)
|
)
|
||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Codeception\Util\Fixtures;
|
use Codeception\Util\Fixtures;
|
||||||
|
|
||||||
$newsletter_body_text =
|
$newsletter_body_text =
|
||||||
|
Reference in New Issue
Block a user