Loading utils/ci/Jenkinsfile +2 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ spec: stage('Linux: Code compliance') { steps { container('openpass-build') { sh 'bash repo/utils/ci/scripts/25_check_inline_docu.sh' sh 'bash repo/utils/ci/scripts/60_check_clang_format.sh' sh 'bash repo/utils/ci/scripts/61_check_eol.sh' sh 'bash repo/utils/ci/scripts/62_static_analysis.sh' } Loading utils/ci/scripts/60_check_clang_format.sh +4 −4 Original line number Diff line number Diff line Loading @@ -24,13 +24,13 @@ if [[ "${OSTYPE}" = "msys" ]]; then exit 0 fi clang-format --version clang-format-15 --version for file in $(find . -type f \( -name "*.h" -o -name "*.cpp" \) ! -path "./sim/deps/*" ! -path "./build/*" ! -path "./gui/*" ! -path "./.git/*" ! -path "./.env/*"); do if $(clang-format -output-replacements-xml $file | grep -c "<replacement " > /dev/null); then if [[ ! "$file" =~ version\.h$ ]]; then # filtering version.h as it is autogenerated if $(clang-format-15 -output-replacements-xml $file | grep -c "<replacement " > /dev/null); then if [[ ! "$file" =~ version\.h$ && ! "$file" =~ version\.cpp$ ]]; then # filtering version.h as it is autogenerated echo "ERROR [clang-format]: $file is not formatted properly" clang-format --style=file --dry-run --Werror "$file" clang-format-15 --style=file --dry-run --Werror "$file" exit_code=1 fi fi Loading Loading
utils/ci/Jenkinsfile +2 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ spec: stage('Linux: Code compliance') { steps { container('openpass-build') { sh 'bash repo/utils/ci/scripts/25_check_inline_docu.sh' sh 'bash repo/utils/ci/scripts/60_check_clang_format.sh' sh 'bash repo/utils/ci/scripts/61_check_eol.sh' sh 'bash repo/utils/ci/scripts/62_static_analysis.sh' } Loading
utils/ci/scripts/60_check_clang_format.sh +4 −4 Original line number Diff line number Diff line Loading @@ -24,13 +24,13 @@ if [[ "${OSTYPE}" = "msys" ]]; then exit 0 fi clang-format --version clang-format-15 --version for file in $(find . -type f \( -name "*.h" -o -name "*.cpp" \) ! -path "./sim/deps/*" ! -path "./build/*" ! -path "./gui/*" ! -path "./.git/*" ! -path "./.env/*"); do if $(clang-format -output-replacements-xml $file | grep -c "<replacement " > /dev/null); then if [[ ! "$file" =~ version\.h$ ]]; then # filtering version.h as it is autogenerated if $(clang-format-15 -output-replacements-xml $file | grep -c "<replacement " > /dev/null); then if [[ ! "$file" =~ version\.h$ && ! "$file" =~ version\.cpp$ ]]; then # filtering version.h as it is autogenerated echo "ERROR [clang-format]: $file is not formatted properly" clang-format --style=file --dry-run --Werror "$file" clang-format-15 --style=file --dry-run --Werror "$file" exit_code=1 fi fi Loading