Don't skip style tests for os that have PHP files (#10053)

This commit is contained in:
Tony Murray
2019-04-01 15:49:55 -05:00
committed by GitHub
parent d628afcc27
commit c36f913cfb

View File

@@ -20,6 +20,7 @@ $map = [
'python' => 0,
'bash' => 0,
'php' => 0,
'os-php' => 0,
'os' => [],
];
@@ -41,6 +42,9 @@ foreach ($changed_files as $file) {
// check if os owned file or generic php file
if (!empty($os_name = os_from_file($file))) {
$map['os'][] = $os_name;
if (ends_with($file, '.php')) {
$map['os-php']++;
}
} elseif (ends_with($file, '.php')) {
$map['php']++;
}
@@ -122,7 +126,7 @@ if (check_opt($options, 'db')) {
}
// No php files, skip the php checks.
if (!empty($changed_files) && $map['php'] === 0) {
if (!empty($changed_files) && $map['php'] === 0 && $map['os-php'] === 0) {
putenv('SKIP_LINT_CHECK=1');
putenv('SKIP_STYLE_CHECK=1');
}