File tree Expand file tree Collapse file tree 6 files changed +25
-5
lines changed Expand file tree Collapse file tree 6 files changed +25
-5
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e -u -o pipefail
4
+
5
+ ret=0
6
+ show=0
7
+ # Reference: https://medium.com/@alexey.inkin/how-to-force-newline-at-end-of-files-and-why-you-should-do-it-fdf76d1d090e
8
+ while IFS= read -rd ' ' f; do
9
+ if file --mime-encoding " $f " | grep -qv binary; then
10
+ tail -c1 < " $f " | read -r _ || show=1
11
+ if [ $show -eq 1 ]; then
12
+ echo " Warning: No newline at end of file $f "
13
+ ret=1
14
+ show=0
15
+ fi
16
+ fi
17
+ done < <( git ls-files -z src tests/arch-test-target)
18
+
19
+ exit $ret
Original file line number Diff line number Diff line change 37
37
- name : coding convention
38
38
run : |
39
39
sudo apt-get install -q -y clang-format-14
40
- sh .ci/check-format.sh
40
+ .ci/check-newline.sh
41
+ .ci/check-format.sh
41
42
shell : bash
Original file line number Diff line number Diff line change @@ -80,4 +80,4 @@ def main(argv):
80
80
print ("ERROR: qtest is not exist" )
81
81
exit (1 )
82
82
83
- main (args )
83
+ main (args )
Original file line number Diff line number Diff line change 22
22
[38;5;89m⎺[7m⎽[0m[38;5;125;48;5;125m⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽[38;5;131m⎽[0m [0m
23
23
[38;5;53m⎺[7m[38;5;89m⎽[0m[38;5;125;48;5;125m⎽⎽⎽⎽⎽⎽⎽⎽⎽[38;5;131;48;5;238m⎺[0m [0m
24
24
[7m[38;5;52m⎽[0m[38;5;131;48;5;53m⎼[38;5;138;48;5;89m⎽[38;5;168;48;5;125m⎽[38;5;174m⎽[0m[7m[38;5;89m⎽[38;5;53m⎽[0m[38;5;240m⎺[0m [0m
25
- [?25h
25
+ [?25h
Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ reverse
21
21
rh z
22
22
rh r
23
23
rh r
24
- rh n
24
+ rh n
Original file line number Diff line number Diff line change 34
34
rh b
35
35
rh c
36
36
rh a
37
- rh a
37
+ rh a
You can’t perform that action at this time.
0 commit comments