Setting allowed_warnings and allowed_errors to 0 by default, -1 in zero config mode. Fixes #377
This commit is contained in:
parent
9f3e66a515
commit
e7e8455887
|
@ -150,7 +150,9 @@ class Build extends BuildBase
|
|||
|
||||
foreach (array('setup', 'test', 'complete', 'success', 'failure') as $stage) {
|
||||
if ($className::canExecute($stage, $builder, $this)) {
|
||||
$config[$stage][$className] = array();
|
||||
$config[$stage][$className] = array(
|
||||
'zero_config' => true
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,8 +97,13 @@ class PhpCodeSniffer implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
$this->encoding = '';
|
||||
$this->path = '';
|
||||
$this->ignore = $this->phpci->ignore;
|
||||
$this->allowed_warnings = -1;
|
||||
$this->allowed_errors = -1;
|
||||
$this->allowed_warnings = 0;
|
||||
$this->allowed_errors = 0;
|
||||
|
||||
if (isset($options['zero_config']) && $options['zero_config']) {
|
||||
$this->allowed_warnings = -1;
|
||||
$this->allowed_errors = -1;
|
||||
}
|
||||
|
||||
if (isset($options['suffixes'])) {
|
||||
$this->suffixes = (array)$options['suffixes'];
|
||||
|
|
|
@ -71,7 +71,11 @@ class PhpMessDetector implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
$this->ignore = $phpci->ignore;
|
||||
$this->path = '';
|
||||
$this->rules = array('codesize', 'unusedcode', 'naming');
|
||||
$this->allowed_warnings = -1;
|
||||
$this->allowed_warnings = 0;
|
||||
|
||||
if (isset($options['zero_config']) && $options['zero_config']) {
|
||||
$this->allowed_warnings = -1;
|
||||
}
|
||||
|
||||
if (!empty($options['path'])) {
|
||||
$this->path = $options['path'];
|
||||
|
|
Loading…
Reference in a new issue