File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ SOURCES=$( find $( git rev-parse --show-toplevel) | egrep " \.(c|cxx|cpp|h|hpp)\$ " )
4+
5+ set -x
6+
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 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ nstack :
7+ runs-on : ubuntu-22.04
8+ steps :
9+ - uses : actions/checkout@v3.1.0
10+ - name : default build
11+ run : make
12+ coding_style :
13+ runs-on : ubuntu-22.04
14+ steps :
15+ - uses : actions/checkout@v3.1.0
16+ - name : coding convention
17+ run : |
18+ sudo apt-get install -q -y clang-format-12
19+ sh .ci/check-format.sh
20+ shell : bash
You can’t perform that action at this time.
0 commit comments