mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Don't skip style tests for os that have PHP files (#10053)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
Reference in New Issue
Block a user