Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:

- name: Uncrustify check
run: |
~/uncrustify/uncrustify -c .uncrustify.cfg -l CPP --no-backup --replace */*.cpp */*.h
UNCRUSTIFY=~/uncrustify/uncrustify ./runformat
git diff
git diff | diff - /dev/null &> /dev/null
2 changes: 1 addition & 1 deletion lib/smallvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct TaggedAllocator : std::allocator<T>
template<class ... Ts>
// cppcheck-suppress noExplicitConstructor
// NOLINTNEXTLINE(google-explicit-constructor)
TaggedAllocator(Ts&&... ts)
TaggedAllocator(Ts && ... ts)
: std::allocator<T>(std::forward<Ts>(ts)...)
{}

Expand Down
24 changes: 13 additions & 11 deletions runformat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#
# uncrustify-0.72 is used to format cppcheck source code.
# uncrustify-0.80.1 is used to format cppcheck source code.
#
# 1. Download source code: https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.72.0.zip
# 1. Download source code: https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.80.1.zip
# It's important that all Cppcheck developers use the exact same version so we don't get a "format battle".
# 2. Building:
# - Linux: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
Expand All @@ -11,7 +11,7 @@
# - you can put uncrustify in your PATH
# - you can create an environment variable UNCRUSTIFY that has the full path of the binary

UNCRUSTIFY_VERSION="0.72.0"
UNCRUSTIFY_VERSION="0.80.1"
UNCRUSTIFY="${UNCRUSTIFY-uncrustify}"

DETECTED_VERSION=$("$UNCRUSTIFY" --version 2>&1 | grep -o -E '[0-9.]+')
Expand Down Expand Up @@ -44,11 +44,13 @@ function formatCplusplus {

}

formatCplusplus cli/
formatCplusplus democlient/
formatCplusplus gui/
formatCplusplus lib/
formatCplusplus oss-fuzz/
formatCplusplus test/
formatCplusplus tools/
formatCplusplus samples/
ls */*.cpp */*.h | xargs -n 1 -P $CPUCOUNT -I{} -t $UNCRUSTIFY -c .uncrustify.cfg -l CPP --no-backup --replace {}

#formatCplusplus cli/
#formatCplusplus democlient/
#formatCplusplus gui/
#formatCplusplus lib/
#formatCplusplus oss-fuzz/
#formatCplusplus test/
#formatCplusplus tools/
#formatCplusplus samples/