From 14be1afd032bd9842aab4fbe9d3340492c472714 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Fri, 5 Jun 2020 14:51:55 +0900 Subject: [PATCH] TAOS-CI / Enable clang-format for C++ codes 1. Enable clang TAOS-CI module 2. Add "C++ ONLY" mode for it. Note that I need to update TAOS-CI to make it accept such options. This depends on https://github.com/nnstreamer/TAOS-CI/pull/628 Signed-off-by: MyungJoo Ham --- .TAOS-CI/config/config-environment.sh | 3 +++ .TAOS-CI/config/config-plugins-prebuild.sh | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.TAOS-CI/config/config-environment.sh b/.TAOS-CI/config/config-environment.sh index 2990b17..e339fba 100644 --- a/.TAOS-CI/config/config-environment.sh +++ b/.TAOS-CI/config/config-environment.sh @@ -166,3 +166,6 @@ _cov_email="taos-ci@github.io" _cov_token="xxxxxxxxxxxxxxxxxxxxxx" _cov_yellow_card=10 _cov_red_card=50 + +# Pre-build checker, Clang is applied to C++ files only. +clang_option="cxx-only" diff --git a/.TAOS-CI/config/config-plugins-prebuild.sh b/.TAOS-CI/config/config-plugins-prebuild.sh index c9dde44..37b90ca 100644 --- a/.TAOS-CI/config/config-plugins-prebuild.sh +++ b/.TAOS-CI/config/config-plugins-prebuild.sh @@ -31,12 +31,12 @@ echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${prebuild_plu source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${prebuild_plugins[idx]}.sh -#prebuild_plugins[++idx]="pr-prebuild-clang" -# echo "${prebuild_plugins[idx]} is starting." -# echo "[MODULE] ${BOT_NAME}/${prebuild_plugins[idx]}: Check the code formatting style with clang-format" -# echo "[DEBUG] The current path: $(pwd)." -# echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${prebuild_plugins[idx]}.sh" -# source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${prebuild_plugins[idx]}.sh +prebuild_plugins[++idx]="pr-prebuild-clang" +echo "${prebuild_plugins[idx]} is starting." +echo "[MODULE] ${BOT_NAME}/${prebuild_plugins[idx]}: Check the code formatting style with clang-format" +echo "[DEBUG] The current path: $(pwd)." +echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${prebuild_plugins[idx]}.sh" +source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${prebuild_plugins[idx]}.sh #prebuild_plugins[++idx]="pr-prebuild-exclusive-vio" # echo "${prebuild_plugins[idx]} is starting." -- 2.7.4