File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- SOURCES=$( find $( git rev-parse --show-toplevel) | egrep " \.(c|h )\$ " )
3
+ SOURCES=$( find $( git rev-parse --show-toplevel) | egrep " \.(c|cxx|cpp|h|hpp )\$ " )
4
4
5
5
set -x
6
6
7
- exit $( clang-format --output-replacements-xml ${SOURCES} | egrep -c " </replacement>" )
7
+ for file in ${SOURCES} ;
8
+ do
9
+ clang-format-12 ${file} > expected-format
10
+ diff -u -p --label=" ${file} " --label=" expected coding style" ${file} expected-format
11
+ done
12
+ exit $( clang-format-12 --output-replacements-xml ${SOURCES} | egrep -c " </replacement>" )
Original file line number Diff line number Diff line change 18
18
sudo apt-get update -q -y
19
19
sudo apt-get install -q -y qemu-user
20
20
sudo apt-get install -q -y build-essential
21
- sudo apt-get install -q -y clang-format
22
- sh .ci/check-format.sh
23
21
make clean config ARCH=arm
24
22
make check || exit 1
25
23
make clean config ARCH=riscv
26
24
make check || exit 1
25
+
26
+ coding_style :
27
+ runs-on : ubuntu-22.04
28
+ steps :
29
+ - uses : actions/checkout@v3
30
+ - name : coding convention
31
+ run : |
32
+ sudo apt-get install -q -y clang-format-12
33
+ sh .ci/check-format.sh
34
+ shell : bash
You can’t perform that action at this time.
0 commit comments