mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 00:07:27 +00:00
make: use slight modify for checking all potential files
This commit is contained in:
parent
062d51889e
commit
14b46feee2
10
Makefile
10
Makefile
@ -362,14 +362,10 @@ lint-exec:
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
LINTBIN?= ${.CURDIR}/contrib/parallel-lint/parallel-lint
|
||||
|
||||
lint-php:
|
||||
@find ${.CURDIR}/src \
|
||||
! -name "*.xml" ! -name "*.xml.sample" ! -name "*.eot" \
|
||||
! -name "*.svg" ! -name "*.woff" ! -name "*.woff2" \
|
||||
! -name "*.otf" ! -name "*.png" ! -name "*.js" \
|
||||
! -name "*.scss" ! -name "*.py" ! -name "*.ttf" \
|
||||
! -name "*.tgz" ! -name "*.xml.dist" ! -name "*.tgb" \
|
||||
-type f -print0 | xargs -0 -n1 php -l
|
||||
@${LINTBIN} src
|
||||
|
||||
lint: plist-check lint-shell lint-xml lint-exec lint-php
|
||||
|
||||
|
||||
@ -140,7 +140,7 @@ class Manager
|
||||
protected function getFilesFromPaths(array $paths, array $extensions, array $excluded = array())
|
||||
{
|
||||
$extensions = array_map('preg_quote', $extensions, array_fill(0, count($extensions), '`'));
|
||||
$regex = '`\.(?:' . implode('|', $extensions) . ')$`iD';
|
||||
$regex = count($extensions) ? '`\.(?:' . implode('|', $extensions) . ')$`iD' : '`.+`iD';
|
||||
$files = array();
|
||||
|
||||
foreach ($paths as $path) {
|
||||
|
||||
@ -44,7 +44,7 @@ class Settings
|
||||
* If path contains directory, only file with these extensions are checked
|
||||
* @var array
|
||||
*/
|
||||
public $extensions = array('php', 'phtml', 'php3', 'php4', 'php5', 'phpt');
|
||||
public $extensions = array();
|
||||
|
||||
/**
|
||||
* Array of file or directories to check
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user