File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050
5151 - name : Uncrustify check
5252 run : |
53- ~/uncrustify/uncrustify -c .uncrustify.cfg -l CPP --no-backup --replace */*.cpp */*.h
53+ UNCRUSTIFY= ~/uncrustify/uncrustify ./runformat
5454 git diff
5555 git diff | diff - /dev/null &> /dev/null
Original file line number Diff line number Diff line change 11#! /bin/bash
22#
3- # uncrustify-0.72 is used to format cppcheck source code.
3+ # uncrustify-0.80.1 is used to format cppcheck source code.
44#
5- # 1. Download source code: https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.72.0 .zip
5+ # 1. Download source code: https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.80.1 .zip
66# It's important that all Cppcheck developers use the exact same version so we don't get a "format battle".
77# 2. Building:
88# - Linux: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
1111# - you can put uncrustify in your PATH
1212# - you can create an environment variable UNCRUSTIFY that has the full path of the binary
1313
14- UNCRUSTIFY_VERSION=" 0.72.0 "
14+ UNCRUSTIFY_VERSION=" 0.80.1 "
1515UNCRUSTIFY=" ${UNCRUSTIFY-uncrustify} "
1616
1717DETECTED_VERSION=$( " $UNCRUSTIFY " --version 2>&1 | grep -o -E ' [0-9.]+' )
@@ -40,7 +40,7 @@ function formatCplusplus {
4040 find $1 -iname ' *.h' \
4141 -o -iname ' *.c' \
4242 -o -iname ' *.cpp' \
43- | xargs -n 1 -P $CPUCOUNT -I{} -t $UNCRUSTIFY -c .uncrustify.cfg --no-backup {}
43+ | xargs -n 1 -P $CPUCOUNT -I{} -t $UNCRUSTIFY -c .uncrustify.cfg -l CPP - -no-backup {}
4444
4545}
4646
You can’t perform that action at this time.
0 commit comments