forked from pfsense/pfsense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
40 lines (33 loc) · 1.08 KB
/
rector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Tools\Rector\Rector\Rules;
return static function (RectorConfig $rectorConfig): void {
// Recursively check these paths...
$rectorConfig->paths([
__DIR__ . '/src',
]);
// for files with these extensions...
$rectorConfig->fileExtensions([
'php',
'inc',
]);
// while skipping third-pary code that isn't our concern.
$rectorConfig->skip([
__DIR__ . '/src/usr/local/pfSense/include/vendor/*',
__DIR__ . '/src/etc/inc/priv.defs.inc',
]);
/*
* Register Rector rules or rulesets here
*
* See https://github.com/rectorphp/rector#running-rector
*
* Place custom Rectors in tools/rector/src/Rector named
* SomeDescriptiveNameRector.php namespaced as "Tools\Rector\Rector".
* Class should be "final" qualified, extend AbstractRector
* and the same name as the filename.
*
* See https://github.com/rectorphp/rector/blob/main/docs/create_own_rule.md
*/
$rectorConfig->rule(Rules\GlobalGGetExprRector::class);
};