Bug 1696491 - when clang errors are present, mark static analysis jobs as failed. r=firefox-build-system-reviewers,mhentges

Our bot was expecting to have tasks that were succeeding, right now we no longer need that
and in a case of a build failure, or in a case of the presence of a checker that asserts itself
as error and not warning we should mark the task red by failing the job.

Differential Revision: https://phabricator.services.mozilla.com/D107656
This commit is contained in:
Andi-Bogdan Postelnicu 2021-03-10 05:20:46 +00:00
Родитель 95e560b7a1
Коммит b3ae95374e
5 изменённых файлов: 3 добавлений и 19 удалений

Просмотреть файл

@ -10,8 +10,7 @@
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"patches": [
"clang-tidy-ci.patch",
"clang-tidy-no-errors.patch"
"clang-tidy-ci.patch"
],
"build_clang_tidy_external": true
}

Просмотреть файл

@ -10,7 +10,6 @@
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"patches": [
"clang-tidy-ci.patch",
"clang-tidy-no-errors.patch"
"clang-tidy-ci.patch"
]
}

Просмотреть файл

@ -16,7 +16,6 @@
"ld": "{MOZ_FETCHES_DIR}/clang/bin/clang",
"patches": [
"clang-tidy-ci.patch",
"clang-tidy-no-errors.patch",
"compiler-rt-cross-compile.patch",
"compiler-rt-no-codesign.patch"
]

Просмотреть файл

@ -1,12 +0,0 @@
diff --git a/clang-tools-extra/clang-tidy/ClangTidyCheck.cpp b/clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
index fbf117688bb..dc7235b1450 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
@@ -20,6 +20,7 @@ ClangTidyCheck::ClangTidyCheck(StringRef CheckName, ClangTidyContext *Context)
DiagnosticBuilder ClangTidyCheck::diag(SourceLocation Loc, StringRef Message,
DiagnosticIDs::Level Level) {
+ Level = Level == DiagnosticIDs::Error ? DiagnosticIDs::Warning : Level;
return Context->diag(CheckName, Loc, Message, Level);
}

Просмотреть файл

@ -9,7 +9,6 @@
"cxx": "cl.exe",
"ml": "ml64.exe",
"patches": [
"clang-tidy-ci.patch",
"clang-tidy-no-errors.patch"
"clang-tidy-ci.patch"
]
}