Commit fee84741 authored by Raghunandan Netrapalli Madhusudhan's avatar Raghunandan Netrapalli Madhusudhan
Browse files

activate doxygen and clang-format check

parent 9f40d0a6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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'
                }
+4 −4
Original line number Diff line number Diff line
@@ -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