Skip to content

Commit 28ff97d

Browse files
committed
doc: sca: Add Bugseng eclair documentation
Add the documentation for the eclair from Bugseng with the pre configuration for the zephyr project. Signed-off-by: Simon Hein <[email protected]>
1 parent ec0e122 commit 28ff97d

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

doc/develop/sca/eclair.rst

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
.. _eclair:
2+
3+
ECLAIR support
4+
##############
5+
6+
Bugseng `ECLAIR <https://www.bugseng.com/eclair/>`__ is a certified
7+
static analysis tool and platform for software verification.
8+
Applications range from coding rule validation, with a
9+
particular emphasis on the MISRA and BARR-C coding standards, to the
10+
computation of software metrics, to the checking of independence and
11+
freedom from interference among software components, to the automatic
12+
detection of important classes of software errors.
13+
14+
.. important::
15+
16+
ECLAIR is a commercial tool, and it is not free software.
17+
You need to have a valid license to use it.
18+
19+
Running ECLAIR
20+
**************
21+
22+
To run ECLAIR, :ref:`west build <west-building>` should be
23+
called with a ``-DZEPHYR_SCA_VARIANT=eclair`` parameter.
24+
25+
.. code-block:: shell
26+
27+
west build -b mimxrt1064_evk samples/basic/blinky -- -DZEPHYR_SCA_VARIANT=eclair
28+
29+
Configurations
30+
**************
31+
32+
There are different configuration sets that can be used to run ECLAIR without adapting
33+
the rule set.
34+
35+
The default configuration is ``first_analysis``, which is a tiny selection of rules
36+
to verify that everything is correctly working.
37+
38+
Zephyr is a large and complex project, so the configuration sets are split the
39+
Zephyr's guidelines selection
40+
(taken from https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html)
41+
in four sets to make it more digestible to use on a private machine:
42+
43+
* first_analysis (default): a tiny selection of rules to verify that everything
44+
is correctly working.
45+
46+
* STU: selection of MISRA guidelines that can be verified by analysing the single
47+
translation units independently.
48+
49+
* STU_heavy: selection of complex STU guidelines that require a significant amount
50+
of time.
51+
52+
* WP: all whole program guidelines of your selection ("system" in MISRA's parlance).
53+
54+
* std_lib: guidelines about the C Standard Library.
55+
56+
To change the configuration, you can define the ``ECLAIR_RULES_SET`` variable,
57+
for example:
58+
59+
.. code-block:: shell
60+
61+
west build -b mimxrt1064_evk samples/basic/blinky -- -DZEPHYR_SCA_VARIANT=eclair -DECLAIR_RULES_SET=STU
62+
63+
Generate additional report formats
64+
**********************************
65+
66+
ECLAIR can generate additional report formats (e.g. DOC, ODT, XLSX) in addition to the
67+
default ecd file. To enable them, you can set the following variables to true:
68+
69+
* ECLAIR_metrics_tab: Metrics in spreadsheet format.
70+
71+
* ECLAIR_reports_tab: Findings in spreadsheet format.
72+
73+
* ECLAIR_summary_txt: Summary report in plain textual format.
74+
75+
* ECLAIR_summary_doc: Summary report in DOC format.
76+
77+
* ECLAIR_summary_odt: Summary report in ODT format.
78+
79+
* ECLAIR_full_txt_areas: Enable/disable detailed reports in txt format.
80+
81+
* ECLAIR_full_txt: Rich/detailed report in plain textual format.
82+
83+
* ECLAIR_full_doc_areas: Enable/disable detailed reports in ODT/DOC format.
84+
85+
* ECLAIR_full_doc: Rich/detailed report in DOC format.
86+
87+
* ECLAIR_full_odt: Rich/detailed report in ODT format.
88+
89+
For example, to generate a summary report in plain textual format:
90+
91+
.. code-block:: shell
92+
93+
west build -b mimxrt1064_evk samples/basic/blinky -- -DZEPHYR_SCA_VARIANT=eclair -DECLAIR_summary_txt=true

doc/develop/sca/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ The following is a list of SCA tools natively supported by Zephyr build system.
6464
codechecker
6565
sparse
6666
gcc
67+
eclair

0 commit comments

Comments
 (0)