Commit c68f540
authored
Add EOL to a bunch of files (hestiacp#4530)
* prettier complain if not end with newline
* a bunch of newlines.
the newlines were created with the following script:
<?php
declare(strict_types=1);
$dir = realpath(__DIR__ . '/..');
chdir($dir);
foreach ((new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS))) as $file) {
if ($file->isDir()) {
continue;
}
if ($file->isLink()) {
continue;
}
$size = $file->getSize();
if ($size === 0) {
continue;
}
$path = $file->getPathname();
$blacklist = array(
'/.git/',
'/node_modules/',
'/vendor/',
'rex:/\\.svg$/i'
);
foreach ($blacklist as $pattern) {
$isBlacklisted = str_starts_with($pattern, 'rex:') ? preg_match(substr($pattern, strlen('rex:')), $path) : str_contains($path, $pattern);
if ($isBlacklisted) {
continue 2;
}
}
$content = file_get_contents($path);
// is binary?
if(strlen($content) !== strcspn($content, "\x00\x01\x02\x03\x04\x05\x06\x07\x08")) {
//var_dump("skipping binary file: {$path}");
continue;
}
$lastByte = substr($content, -1);
if ($lastByte === "\n") {
continue;
}
var_dump($path, $lastByte);
$content .= "\n";
file_put_contents($path, $content, LOCK_EX);
}
?>
* prettier fix1 parent 9ce0b51 commit c68f540
File tree
41 files changed
+42
-40
lines changed- install
- common
- dovecot/sieve
- templates/dns
- deb
- apache2
- bind
- exim
- fail2ban/action.d
- logrotate
- templates/mail/apache2
- rpm
- bind
- dovecot
- fail2ban/action.d
- hestia
- httpd
- logrotate
- mysql
- nginx
- php-fpm
- templates
- mail/apache2
- web/php-fpm
- test
- web
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+42
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
0 commit comments