Sync Coverity scripts with internal CI
Sync the scripts with platform-ci commit:
539c151d0cd99a5e6ca6c0e6966f6d8579fe864e
Signed-off-by: Zelalem <zelalem.aweke@arm.com>
Change-Id: I260c3490cc5079b66b735b03116af56501fa0642
diff --git a/coverity/MISRA_c2012_2_ARM_TF.config b/coverity/MISRA_c2012_2_ARM_TF.config
new file mode 100644
index 0000000..98b19a0
--- /dev/null
+++ b/coverity/MISRA_c2012_2_ARM_TF.config
@@ -0,0 +1,67 @@
+//
+// Copyright (c) 2019, Arm Limited. All rights reserved.
+//
+// SPDX-License-Identifier: BSD-3-Clause
+//
+
+// Default enabled rules are:
+
+// Parse warnings and recoverable warnings related:
+// Rule 2.1, Rule 2.2, Rule 3.1, Rule 3.2, Rule 4.2, Rule 5.3, Rule 5.7, Rule 8.2, Rule 17.3, Rule 20.9, Rule 20.14,
+
+// Other default enabled rules:
+// Directive 4.4, Directive 4.7, Directive 4.12, Rule 1.2, Rule 5.1, Rule 5.2, Rule 5.4, Rule 5.5, Rule 8.1, Rule 9.1,
+// Rule 8.14, Rule 13.6, Rule 15.6, Rule 16.2, Rule 16.3, Rule 16.4, Rule 16.5, Rule 16.6, Rule 16.7, Rule 17.1,
+// Rule 17.4, Rule 17.6, Rule 19.1, Rule 19.2, Rule 21.4, Rule 21.5, Rule 21.6, Rule 21.7, Rule 21.8, Rule 21.9,
+// Rule 21.10, Rule 21.11, Rule 21.12, Rule 22.1, Rule 22.2, Rule 22.4, Rule 22.5, Rule 22.6.
+
+// You can disable the above rules (except mandatory rules) by adding "deviation"s and "reason"s in "deviations" field.
+// Mandatory rules: 9.1, 13.6, 17.3, 17.4, 17.6, 19.1, 22.2, 22.4, 22.5, 22.6.
+
+{
+ version : "2.0",
+ standard : "c2012",
+ title: "Coverity Compliance",
+ deviations : [
+ // Remove these deviations once you’re ready to go to level 2
+
+ // Deviations: Optional, skipped in full scan as issues might be present in existing code base
+ { deviation: "Rule 1.2", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 2.3", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 5.7", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 8.11", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 8.13", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 10.1", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 10.3", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 10.4", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 11.6", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 17.7", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 17.8", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 19.2", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 20.1", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 20.8", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 20.9", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 20.10", reason: "This rule is currently disabled in the analysis configuration." },
+
+ // Deviations: Not Enforced, can be skipped for new code as well
+ { deviation: "Rule 2.4", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 2.5", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 2.7", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Directive 4.6", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Directive 4.8", reason: "We can't comply with this (advisory) rule without invasive changes to the codebase." },
+ { deviation: "Directive 4.9", reason: "This (advisory) rule flags assert(), CASSERT(), INFO()..." },
+ { deviation: "Rule 5.1", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 5.8", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 8.6", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 8.7", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 11.4", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 11.5", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 15.1", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 15.5", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 15.6", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 16.1", reason: "This rule is a superset of rule 16.3 which we cannot comply with." },
+ { deviation: "Rule 16.3", reason: "We make extensive use of unconditional return within switch clauses." },
+ { deviation: "Rule 17.1", reason: "This rule is currently disabled in the analysis configuration." },
+ { deviation: "Rule 21.6", reason: "This rule is currently disabled in the analysis configuration." }
+ ]
+}
diff --git a/coverity/run_coverity.sh b/coverity/run_coverity.sh
index b2e741a..62e4801 100755
--- a/coverity/run_coverity.sh
+++ b/coverity/run_coverity.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 2019, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -81,7 +81,7 @@
cov-configure \
--comptype gcc \
--template \
- --compiler arm-none-eabi-gcc \
+ --compiler arm-none-eabi-gcc \
--config cov-config/config.xml
}