From 04145abea8338f140c8f94bc9fc5837ab64dd0ce Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 18 Sep 2025 18:54:38 +0200 Subject: [PATCH] tools/ci: Remove uncrustify functions. Signed-off-by: iabdalkader --- tools/ci.sh | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/tools/ci.sh b/tools/ci.sh index c6ef04988..02555bdad 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -75,45 +75,6 @@ ci_package_firmware_development() { (cd firmware && for i in *; do zip -r -j "firmware_${i%/}.zip" "$i"; done) } -######################################################################################## -# Install code formatter deps -CODEFORMAT_PATH=${HOME}/cache/deps/ -UNCRUSTIFY_PATH=${CODEFORMAT_PATH}/uncrustify -UNCRUSTIFY_URL="https://github.com/uncrustify/uncrustify/archive/uncrustify-0.75.0.tar.gz" - -ci_install_code_format_deps() { - sudo apt-get install wget cmake build-essential colordiff - - mkdir -p ${UNCRUSTIFY_PATH} - wget --no-check-certificate -O - ${UNCRUSTIFY_URL} | tar xvz --strip-components=1 -C ${UNCRUSTIFY_PATH} - (cd ${UNCRUSTIFY_PATH} && mkdir build && cd build && cmake .. && cmake --build .) - - # Copy binaries to cache - mkdir -p ${CODEFORMAT_PATH}/bin - cp ${UNCRUSTIFY_PATH}/build/uncrustify ${CODEFORMAT_PATH}/bin/ - cp `which colordiff` ${CODEFORMAT_PATH}/bin/ - chmod +x ${CODEFORMAT_PATH}/bin/uncrustify -} - -######################################################################################## -# Run code formatter -ci_run_code_format_check() { - export PATH=${CODEFORMAT_PATH}/bin:${PATH} - UNCRUSTIFY_CONFIG=tools/uncrustify.cfg - - exit_code=0 - for file in "$@"; do - file_fmt="${file}.tmp" - uncrustify -q -c ${UNCRUSTIFY_CONFIG} -f ${file} -o ${file_fmt} || true - - diff -q -u ${file} ${file_fmt} >> /dev/null 2>&1 || { - colordiff -u ${file} ${file_fmt} || true - exit_code=1 - } - done - exit $exit_code -} - ######################################################################################## # Install STEdgeAI tools STEDGEAI_URL="https://upload.openmv.io/stedgeai/STEdgeAI-2.1.0.tar.gz"