eclair: Add initial scripts and configs for the ECLAIR MISRA analysis tool

Scripts and configs are imported from the private prototype repository used
during initial stages of development. They are in turn based on
scripts/configs provided by Bugseng (ECLAIR vendor), as used in their
demo job for TF-A: https://eclairit.com:8443/job/TF-A/

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I10fbb55859beda7c9a6c36cdb202bcbd70bf95b7
diff --git a/eclair/common_config.ecl b/eclair/common_config.ecl
new file mode 100644
index 0000000..c8e1b8f
--- /dev/null
+++ b/eclair/common_config.ecl
@@ -0,0 +1,40 @@
+-eval_file=toolchain.ecl
+
+-eval_file=public_APIs.ecl
+-public_files+=api:public
+
+-doc_begin="Treat LIBC as external, as they have many peculiar declarations leading to spurious warnings."
+-file_tag+={external, "^include/lib/libc/.*$"}
+-file_tag+={external, "^lib/libc/.*$"}
+-doc_end
+
+-file_tag+={external, "^lib/compiler-rt/.*$"}
+-file_tag+={external, "^include/lib/libfdt/.*$"}
+-file_tag+={external, "^lib/libfdt/.*$"}
+
+-doc="Build version file is autogenerated and piped directly to compiler, captured by ECLAIR as /dev/pipe/XXX, changing from build to build, leading to spurious diffs."
+#-file_tag+={external, "^_ROOT/dev/pipe/.*$"}
+#-file_tag+={external, "^/dev/pipe/.*$"}
+-source_files={hide, "^/dev/pipe/.*$"}
+
+-doc="FIXME: cite the compiler manual section describing support for __asm__."
+-config=MC3R1.R1.2,reports+={hide,"category(^STD.tokenext/__asm__$)"}
+
+-doc="FIXME: cite the compiler manual section describing support for __attribute__."
+-config=MC3R1.R1.2,reports+={hide,"category(^STD.tokenext/__attribute__$)"}
+
+-doc="FIXME: cite the compiler manual section describing support for __typeof__."
+-config=MC3R1.R1.2,reports+={hide,"category(^STD.tokenext/__typeof__$)"}
+
+-doc_begin="Unless specified otherwise, a function with a non-const pointer argument is assumed not to read the pointee before writing it and it is assumed to write something to it before returning."
+-default_call_properties+="pointee_read(1..=never)"
+-default_call_properties+="pointee_write(1..=always)"
+-doc_end
+
+
+-doc="Unless specified otherwise, a function is assumed to not save/preserve the pointers received as arguments."
+-default_call_properties+="taken()"
+
+-remap_rtag={safe, hide}
+# Hide known TODOs for now
+-remap_rtag={todo, hide}