[ci] Fix condtional checks
Triggering condition was C/C++ lint and include guard check was the
inverse of what is should be. So the check triggered when it wasn't
needed and vice-versa
Signed-off-by: Greg Chadwick <gac@lowrisc.org>
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index a83c67a..58f74a7 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -74,7 +74,7 @@
#echo "##vso[task.issue type=error;sourcepath=/azure-pipelines.yml;linenumber=45;columnnumber=1;code=100;]Found something that could be a problem."
fork_origin="$(git merge-base --fork-point origin/master)"
changed_files="$(git diff --name-only "$fork_origin" | grep -v /vendor/ | grep -E '\.(cpp|cc|c|h)$')"
- if [[ -z "$changed_files" ]]; then
+ if [[ -n "$changed_files" ]]; then
xargs git diff -U0 "$fork_origin" <<< "$changed_files" \
| clang-format-diff -p1 \
| tee clang-format-output
@@ -91,7 +91,7 @@
- bash: |
fork_origin="$(git merge-base --fork-point origin/master)"
changed_files="$(git diff --name-only "$fork_origin")"
- if [[ -z "$changed_files" ]]; then
+ if [[ -n "$changed_files" ]]; then
xargs util/fix_include_guard.py --dry-run <<< "$changed_files" | tee fix-include-guard-output
if [[ -s fix-include-guard-output ]]; then
echo -n "##vso[task.logissue type=error]"