Add eclair scripts
copy these scripts from ci/tf-ci-scripts
Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: I555cb85bcb207d247d84e06fcd47d22e55b4ac10
diff --git a/eclair/analyze_index_html.sh b/eclair/analyze_index_html.sh
new file mode 100755
index 0000000..c1a5795
--- /dev/null
+++ b/eclair/analyze_index_html.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# Copyright (c) 2022 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Template to produce index.html for the "full" build.
+
+if [ -n "${TF_CONFIG}" ]; then
+ build_config="TF-A Config: ${TF_CONFIG}<br />"
+fi
+
+cat <<EOF >index.html
+<html>
+<body>
+<h1>MISRA reports</h1>
+
+<p>
+${build_config}
+CI Build: <a href="${BUILD_URL}">${BUILD_URL}</a>
+</p>
+
+Reports:
+<ul>
+<li><a href='ECLAIR/full_html/by_service.html#service/first_file&kind{"select":true,"selection":{"hiddenAreaKinds":[],"hiddenSubareaKinds":[],"show":true,"selector":{"enabled":true,"negated":false,"kind":1,"children":[{"enabled":true,"negated":false,"kind":0,"domain":"strictness","inputs":[{"enabled":true,"text":"mandatory"}]},{"enabled":true,"negated":false,"kind":0,"domain":"kind","inputs":[{"enabled":true,"text":"violation"}]}]}}}'>Mandatory rules - violations</a>
+<li><a href='ECLAIR/full_html/by_service.html#service/first_file&kind{"select":true,"selection":{"hiddenAreaKinds":[],"hiddenSubareaKinds":[],"show":true,"selector":{"enabled":true,"negated":false,"kind":1,"children":[{"enabled":true,"negated":false,"kind":0,"domain":"strictness","inputs":[{"enabled":true,"text":"mandatory"}]},{"enabled":true,"negated":false,"kind":0,"domain":"kind","inputs":[{"enabled":true,"text":"violation"},{"enabled":true,"text":"caution"}]}]}}}'>Mandatory rules - violations & cautions</a>
+<li><a href='ECLAIR/full_html/by_service.html#strictness/service/first_file&strictness{"select":true,"selection":{"hiddenAreaKinds":[],"hiddenSubareaKinds":[],"show":true,"selector":{"enabled":true,"negated":false,"kind":2,"children":[{"enabled":true,"negated":false,"kind":0,"domain":"kind","inputs":[{"enabled":true,"text":"violation"}]}]}}}'>Report by issue strictness (Mandatory/Required/Advisory) (violations)</a>
+<li><a href='ECLAIR/full_html/by_service.html#strictness/service/first_file&strictness'>Report by issue strictness (Mandatory/Required/Advisory) (all)</a>
+</ul>
+
+<ul>
+<li><a href="ECLAIR/full_html/index.html">Default ECLAIR report</a>
+<li><a href="ECLAIR/full_txt/">Default ECLAIR report (plain text)</a>
+</ul>
+
+<span style="font-size: 75%">
+<p>
+ECLAIR terminology cheatsheet:
+</p>
+<ul>
+<li>"violation" is formally proven issue
+<li>"caution" is <i>not</i> formally proven issue, may be a false positive
+<li>"information" is <i>not an issue</i> (from MISRA rules PoV), just FYI aka "know your codebase better"
+</ul>
+</span>
+
+</body>
+</html>
+EOF