Change ./do qa:code-sniffer to include warnings by default

This change is necessary to make sure we are running PHPCS with the same
parameters in both CircleCI and the pre-commit hook. For more
information see the description of the related Jira ticket.

[MAILPOET-3831]
This commit is contained in:
Rodrigo Primo
2021-09-23 11:35:35 -03:00
committed by Veljko V
parent e9a4c6e090
commit 2f494a2951

View File

@ -343,7 +343,7 @@ class RoboFile extends \Robo\Tasks {
$collection = $this->collectionBuilder();
$collection->addCode([$this, 'qaLint']);
$collection->addCode(function() {
return $this->qaCodeSniffer([], ['severity' => 'all']);
return $this->qaCodeSniffer([]);
});
return $collection->run();
}
@ -367,7 +367,7 @@ class RoboFile extends \Robo\Tasks {
return $this->_exec('npm run stylelint-check -- "assets/css/src/**/*.scss"');
}
public function qaCodeSniffer(array $filesToCheck, $opts = ['severity' => 'errors']) {
public function qaCodeSniffer(array $filesToCheck, $opts = ['severity' => 'all']) {
$severityFlag = $opts['severity'] === 'all' ? '-w' : '-n';
$task = implode(' ', [
'./tasks/code_sniffer/vendor/bin/phpcs',