Skip to content

Commit f57dbfb

Browse files
Consolidates some regular expressions
1 parent 325dca2 commit f57dbfb

1 file changed

Lines changed: 7 additions & 22 deletions

File tree

check-smf-license.php

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,21 @@
1313

1414
// Stuff we will ignore.
1515
$ignoreFiles = [
16-
// Index files.
17-
'\./attachments/index\.php',
18-
'\./avatars/index\.php',
19-
'\./avatars/[A-Za-z0-9]+/index\.php',
20-
'\./cache/index\.php',
21-
'\./custom_avatar/index\.php',
22-
'\./Packages/index\.php',
23-
'\./Packages/backups/index\.php',
24-
'\./Smileys/[A-Za-z0-9]+/index\.php',
25-
'\./Smileys/index\.php',
26-
'\./Sources/index\.php',
27-
'\./Sources/[\w/]+/index\.php',
28-
'\./other/Schema/[\w/]+/*\.php',
29-
'\./Themes/default/index\.php',
30-
'\./Themes/default/[\w/]+/index\.php',
31-
'\./Themes/index\.php',
16+
// Index files in subdirectories.
17+
'\./(?:\w+/)+\bindex\.php',
3218

3319
// Language Files are ignored as they don't use the License format.
34-
'./Themes/default/languages/[A-Za-z0-9]+\.english\.php',
35-
'./Languages/en_US/[A-Za-z0-9]+\.php',
36-
'./Themes/default/languages/en_US/[A-Za-z0-9]+\.php',
37-
'\./Languages/index\.php',
20+
'./Themes/default/languages/',
21+
'\./Languages/',
3822

3923
// Cache and miscellaneous.
4024
'\./cache/',
41-
'\./other/db_last_error\.php',
42-
'\./other/update_[A-Za-z0-9_]+\.php',
4325
'\./tests/',
4426
'\./vendor/',
4527

28+
// Everything in other except install.php, upgrade.php, Settings.php and Settings_bak.php.
29+
'\./other/(?!install|upgrade|Settings)\w+\.php',
30+
4631
// We will ignore Settings.php if this is a live dev site.
4732
'\./Settings\.php',
4833
'\./Settings_bak\.php',

0 commit comments

Comments
 (0)