Skip to content

Commit dccb4e6

Browse files
committed
Sync leading and final newlines
This patch adds missing newlines, trims multiple redundant final newlines into a single one and trims leading newlines at the beginning of the files. According to POSIX, a line is a sequence of zero or more non-'<newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
1 parent 8e96168 commit dccb4e6

40 files changed

+29
-48
lines changed

.htaccess

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
php_value include_path .:./include:../include
1+
php_value include_path .:./include:../include

api.php

-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@
5454
</p>
5555
<?php
5656
common_footer();
57-

build.php

-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,3 @@ function outputReportTable(string $type, string $branch, string $revision) {
9393
echo "</table>\n";
9494
echo "<br/>\n";
9595
}
96-

expectf_details.php

-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,3 @@
8989
<?php
9090

9191
common_footer();
92-

pftt_report.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ function exit_error($msg='') {
122122
// done, successfully
123123
echo "Uploaded to $report_file";
124124

125-
?>
125+
?>

pulls/api.php

-1
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,3 @@ function requestlog() {
270270
header('HTTP/1.0 400 Bad Request');
271271
die(json_encode(array('success' => false, 'errors' => array("Unknown method"))));
272272
}
273-

pulls/jquery-ui.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,4 +562,4 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
562562
* http://docs.jquery.com/UI/Progressbar#theming
563563
*/
564564
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
565-
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
565+
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }

pulls/pullrequests.js

-1
Original file line numberDiff line numberDiff line change
@@ -271,4 +271,3 @@ function updateRepo(reponame, num, dia) {
271271
}});
272272
dia.dialog("destroy");
273273
}
274-

regtests/README

-6
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,3 @@ directory
6060
#:>. ./test/compare
6161
this will run diff over the outputs and put the results in
6262
test/compare.out
63-
64-
65-
66-
67-
68-

regtests/maketests

-2
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,3 @@ close (TMASTER);
212212

213213
print TCOMPARE "$compareExitCmds";
214214
close (TCOMPARE);
215-
216-

regtests/runtests

-2
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,3 @@ close (TMASTER);
213213

214214
print TCOMPARE "$compareExitCmds";
215215
close (TCOMPARE);
216-
217-

reports/parse_ciqa.php

-2
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,3 @@
187187
if ($status === true) echo "SUCCESS !\n";
188188
else echo " ERROR :( \n";
189189
}
190-
191-

reports/test-insert.php

-1
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,3 @@
203203
$database->exec('DELETE FROM reports WHERE id = '.$sqlReport['id']);
204204
$database->close();
205205
echo "<b>Cleanup done</b>";
206-

sample_tests/clean.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040

4141
<?php
4242
common_footer();
43-
?>
43+
?>

sample_tests/file012.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
<?php
2121
common_footer();
22-
?>
22+
?>

sample_tests/sample001.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@
7373

7474
<?php
7575
common_footer();
76-
?>
76+
?>

sample_tests/sample002.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434

3535
<?php
3636
common_footer();
37-
?>
37+
?>

sample_tests/sample003.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ function method() { $this-&gt;yes++; }
6161

6262
<?php
6363
common_footer();
64-
?>
64+
?>

sample_tests/sample006.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@
6666

6767
<?php
6868
common_footer();
69-
?>
69+
?>

sample_tests/sample008.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@
5454

5555
<?php
5656
common_footer();
57-
?>
57+
?>

sample_tests/sample009.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929

3030
<?php
3131
common_footer();
32-
?>
32+
?>

sample_tests/sample010.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@
4848

4949
<?php
5050
common_footer();
51-
?>
51+
?>

sample_tests/sample011.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525

2626
<?php
2727
common_footer();
28-
?>
28+
?>

sample_tests/sample012.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

2323
<?php
2424
common_footer();
25-
?>
25+
?>

sample_tests/sample013.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828

2929
<?php
3030
common_footer();
31-
?>
31+
?>

sample_tests/sample014.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444

4545
<?php
4646
common_footer();
47-
?>
47+
?>

sample_tests/sample016.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232

3333
<?php
3434
common_footer();
35-
?>
35+
?>

sample_tests/sample017.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@
7575

7676
<?php
7777
common_footer();
78-
?>
78+
?>

sample_tests/sample018.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141

4242
<?php
4343
common_footer();
44-
?>
44+
?>

sample_tests/sample019.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@
5959

6060
<?php
6161
common_footer();
62-
?>
62+
?>

sample_tests/sample020.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242

4343
<?php
4444
common_footer();
45-
?>
45+
?>

sample_tests/sample021.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@
6464

6565
<?php
6666
common_footer();
67-
?>
67+
?>

sample_tests/sample022.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@
6868

6969
<?php
7070
common_footer();
71-
?>
71+
?>

sample_tests/sample023.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131

3232
<?php
3333
common_footer();
34-
?>
34+
?>

sample_tests/sample024.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@
4848

4949
<?php
5050
common_footer();
51-
?>
51+
?>

sample_tests/sample025.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@
8686

8787
<?php
8888
common_footer();
89-
?>
89+
?>

sample_tests/sample026.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939

4040
<?php
4141
common_footer();
42-
?>
42+
?>

sample_tests/skipif.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141

4242
<?php
4343
common_footer();
44-
?>
44+
?>

sample_tests/skipif2.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
<?php
2121
common_footer();
22-
?>
22+
?>

write-test.php

-1
Original file line numberDiff line numberDiff line change
@@ -538,4 +538,3 @@ function or an array function) , or a function provided by one of PHP's numerous
538538

539539
common_footer();
540540
?>
541-

0 commit comments

Comments
 (0)