mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update dev:check style to use php-cs-fixer (#12132)
* Update dev:check style to use php-cs-fixer * dont override default paths * Update .php_cs Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
This commit is contained in:
@@ -204,22 +204,13 @@ class CiHelper
|
||||
*/
|
||||
public function checkStyle()
|
||||
{
|
||||
|
||||
// Disabled in favor of styleci
|
||||
echo "Style check disabled.\n";
|
||||
|
||||
return 0;
|
||||
|
||||
$cs_cmd = [
|
||||
$this->checkPhpExec('phpcs'),
|
||||
'-n',
|
||||
'-p',
|
||||
'--colors',
|
||||
'--extensions=php',
|
||||
'--standard=misc/phpcs_librenms.xml',
|
||||
$this->checkPhpExec('php-cs-fixer'),
|
||||
'fix',
|
||||
'-v',
|
||||
];
|
||||
|
||||
$files = $this->flags['full'] ? ['./'] : $this->changed['php'];
|
||||
$files = $this->flags['full'] ? [] : $this->changed['php'];
|
||||
$cs_cmd = array_merge($cs_cmd, $files);
|
||||
|
||||
return $this->execute('style', $cs_cmd);
|
||||
|
Reference in New Issue
Block a user