From fc1d4d6f7dd28d534d8f7c257a48feb22d871b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 5 Jan 2024 10:06:10 +0100 Subject: [PATCH] runformat: improve instructions [ci skip] (#5833) --- runformat | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/runformat b/runformat index bb8c45746..60ad1b2ab 100755 --- a/runformat +++ b/runformat @@ -1,9 +1,15 @@ #!/bin/bash # # uncrustify-0.72 is used to format cppcheck source code. -# source code: https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.72.0.zip -# building in Linux: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -# building in Windows: mkdir build && cd build && cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release .. && nmake +# +# 1. Download source code: https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.72.0.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 +# - Windows: mkdir build && cd build && cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release .. && nmake +# 3. Ensure that the binary "uncrustify" is found by runformat. Either: +# - 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="${UNCRUSTIFY-uncrustify}"