jobs: - job: static_checks displayName: Static checks pool: name: MLNX demands: - ucx_docker -equals yes container: fedora steps: - checkout: self clean: true fetchDepth: 100 - bash: | set -eEx . buildlib/tools/common.sh prepare_build clang --version gcc --version cppcheck --version ${WORKSPACE}/contrib/configure-release export PATH="`csclng --print-path-to-wrap`:`cscppc --print-path-to-wrap`:`cswrap --print-path-to-wrap`:$PATH" set -o pipefail make -j`nproc` |& tee compile.log set +o pipefail cs_errors="cs.err" cslinker --quiet compile.log \ | csgrep --mode=json --path ${WORKSPACE} --strip-path-prefix ${WORKSPACE} \ | csgrep --mode=json --invert-match --path 'conftest.c' \ | csgrep --mode=grep --invert-match --event "internal warning" --prune-events=1 \ > $cs_errors if [ -s $cs_errors ]; then echo "static checkers found errors:" cat $cs_errors echo "##vso[task.logissue type=error]static checkers found errors" echo "##vso[task.complete result=Failed;]" else echo "No errors reported by static checkers" fi displayName: cstools reports env: BUILD_ID: "$(Build.BuildId)-$(Build.BuildNumber)"