Skip to content

Commit d8b86f1

Browse files
LucaCiuccinashif
authored andcommitted
doc: update ECLAIR documentation
Added prerequisites section, fixed some typos and added ECLAIR_RULESET_ZEPHYR_GUIDELINES option. Also updated dead doc string links in ECLAIR configuration files. Signed-off-by: Luca Ciucci <[email protected]>
1 parent c56a804 commit d8b86f1

File tree

7 files changed

+51
-35
lines changed

7 files changed

+51
-35
lines changed

cmake/sca/eclair/ECL/analysis_STU.ecl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-eval_file=zephyr_common_config.ecl
1010

1111
-doc_begin="Selection of guidelines from
12-
https://docs.zephyrproject.org/latest/guides/coding_guidelines/index.html"
12+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html"
1313
-enable=MC3R1.D4.13
1414
-enable=MC3R1.D4.2
1515
-enable=MC3R1.D4.4

cmake/sca/eclair/ECL/analysis_WP.ecl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-eval_file=zephyr_common_config.ecl
1010

1111
-doc_begin="Selection of guidelines from
12-
https://docs.zephyrproject.org/latest/guides/coding_guidelines/index.html"
12+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html"
1313
-enable=MC3R1.R2.3
1414
-enable=MC3R1.R2.1
1515
-enable=MC3R1.R5.9

cmake/sca/eclair/ECL/analysis_first_analysis.ecl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-eval_file=zephyr_common_config.ecl
1010

1111
-doc_begin="Selection of guidelines from
12-
https://docs.zephyrproject.org/latest/guides/coding_guidelines/index.html"
12+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html"
1313
-enable=MC3R1.R8.2
1414
-enable=MC3R1.R10.2
1515
-enable=MC3R1.R10.5

cmake/sca/eclair/ECL/analysis_heavy_STU.ecl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-eval_file=zephyr_common_config.ecl
1010

1111
-doc_begin="Selection of guidelines from
12-
https://docs.zephyrproject.org/latest/guides/coding_guidelines/index.html"
12+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html"
1313
-enable=MC3R1.D4.6
1414
-enable=MC3R1.D4.9
1515
-enable=MC3R1.R12.1

cmake/sca/eclair/ECL/analysis_std_lib.ecl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-eval_file=zephyr_common_config.ecl
99

1010
-doc_begin="Selection of guidelines from
11-
https://docs.zephyrproject.org/latest/guides/coding_guidelines/index.html"
11+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html"
1212
-enable=MC3R1.R21.1
1313
-enable=MC3R1.R21.12
1414
-enable=MC3R1.R21.14

cmake/sca/eclair/ECL/analysis_zephyr_guidelines.ecl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# they may be adapted of course.
88
-eval_file=zephyr_common_config.ecl
99

10-
-doc_begin="Selection of guidelines from
10+
-doc_begin="Main rules from
1111
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html"
1212
-enable=MC3R1.D1.1
1313
-enable=MC3R1.D2.1

doc/develop/sca/eclair.rst

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@ computation of software metrics, to the checking of independence and
1111
freedom from interference among software components, to the automatic
1212
detection of important classes of software errors.
1313

14-
.. important::
14+
Prerequisites
15+
*************
1516

16-
ECLAIR is a commercial tool, and it is not free software.
17-
You need to have a valid license to use it.
17+
The ECLAIR tool must be installed and made available in the operating system's
18+
PATH variable.
19+
20+
To verify the installation, you can run:
21+
22+
.. code-block:: shell
23+
24+
eclair -version
25+
26+
A valid license or trial license is required to use ECLAIR. To request a trial
27+
license, visit `this page <https://www.bugseng.com/eclair/free-trial>`__.
1828

1929
Running ECLAIR
2030
**************
@@ -34,37 +44,39 @@ called with a ``-DZEPHYR_SCA_VARIANT=eclair`` parameter.
3444
Configurations
3545
**************
3646

37-
The configure of the ECLAIR SCA environment can either be done via a cmake options file or with
38-
adapted options as command line arguments.
47+
The configuration of the ECLAIR SCA environment can either be done via a CMake
48+
options file or with adapted options as command line arguments.
3949

40-
To invoke a cmake options file into the ECLAIR call, you can define the ``ECLAIR_OPTIONS_FILE``
41-
variable, for example:
50+
To invoke a CMake options file into the ECLAIR call, you can define the
51+
``ECLAIR_OPTIONS_FILE`` variable, for example:
4252

4353
.. code-block:: shell
4454
4555
west build -b mimxrt1064_evk samples/basic/blinky -- -DZEPHYR_SCA_VARIANT=eclair -DECLAIR_OPTIONS_FILE=my_options.cmake
4656
47-
The default (if no config file is given) configuration is always ``first_analysis``,
48-
which is a tiny selection of rules to verify that everything is correctly working.
57+
The default (if no config file is given) configuration is always
58+
``first_analysis``, which is a tiny selection of rules to verify that
59+
everything is correctly working.
4960

50-
If the default configuration wants to be overwritten via the command line and not via a options
51-
file, that can be achived by giving the argument ``-DOption=ON|OFF``.
61+
If the default configuration wants to be overwritten via the command line and
62+
not via an options file, that can be achieved by giving the argument
63+
``-DOption=ON|OFF``.
5264

5365
For example:
5466

5567
.. code-block:: shell
5668
5769
west build -b mimxrt1064_evk samples/basic/blinky -- -DZEPHYR_SCA_VARIANT=eclair -DECLAIR_REPORTS_SARIF=ON
5870
59-
Zephyr is a large and complex project, so the configuration sets are split the
60-
Zephyr's guidelines selection
71+
Zephyr is a large and complex project, so the configuration sets are split into
72+
the Zephyr's guidelines selection
6173
(taken from https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html)
6274
in five sets to make it more digestible to use on a private machine:
6375

64-
* first_analysis (default): a tiny selection of the projects coding guidelines to verify that
76+
* first_analysis (default): a tiny selection of the project's coding guidelines to verify that
6577
everything is correctly working.
6678

67-
* STU: Selection of the projects coding guidelines, which can be verified by analysing the single
79+
* STU: Selection of the project's coding guidelines, which can be verified by analyzing the single
6880
translation units independently.
6981

7082
* STU_heavy: Selection of complex STU project coding guidelines that require a significant amount
@@ -74,27 +86,31 @@ in five sets to make it more digestible to use on a private machine:
7486

7587
* std_lib: Project coding guidelines about the C Standard Library.
7688

77-
Related cmake options:
89+
In addition, the zephyr_guidelines ruleset contains all the main rules
90+
listed in the `Coding Guidelines <https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html>`__.
91+
92+
Related CMake options:
7893

7994
* ``ECLAIR_RULESET_FIRST_ANALYSIS``
8095
* ``ECLAIR_RULESET_STU``
8196
* ``ECLAIR_RULESET_STU_HEAVY``
8297
* ``ECLAIR_RULESET_WP``
8398
* ``ECLAIR_RULESET_STD_LIB``
99+
* ``ECLAIR_RULESET_ZEPHYR_GUIDELINES``
84100

85-
User defined ruleset
101+
User-defined ruleset
86102
====================
87103

88-
If you want to use your own defined ruleset instead of the predefined zephyr coding guidelines
89-
rulesets. You can do so by setting :code:`ECLAIR_RULESET_USER=ON`.
90-
Created your own rulset file for ECLAIR with the following naming format:
91-
``analysis_<RULESET>.ecl``. After creating the file define the name of the ruleset for ECLAIR
92-
with the cmake variable :code:`ECLAIR_USER_RULESET_NAME`.
104+
If you want to use your own defined ruleset instead of the predefined Zephyr coding guidelines
105+
rulesets, you can do so by setting :code:`ECLAIR_RULESET_USER=ON`.
106+
Create your own ruleset file for ECLAIR with the following naming format:
107+
``analysis_<RULESET>.ecl``. After creating the file, define the name of the ruleset for ECLAIR
108+
with the CMake variable :code:`ECLAIR_USER_RULESET_NAME`.
93109
If the ruleset file is not in the application source directory, you can define the path to the
94-
ruleset file with the cmake variable :code:`ECLAIR_USER_RULESET_PATH`. This configuration takes
110+
ruleset file with the CMake variable :code:`ECLAIR_USER_RULESET_PATH`. This configuration takes
95111
relative paths and absolute paths.
96112

97-
Related cmake options and variables:
113+
Related CMake options and variables:
98114

99115
* ``ECLAIR_RULESET_USER``
100116
* ``ECLAIR_USER_RULESET_NAME``
@@ -103,8 +119,8 @@ Related cmake options and variables:
103119
Generate additional report formats
104120
**********************************
105121

106-
ECLAIR can generate additional report formats (e.g. DOC, ODT, XLSX) and
107-
different variants of repots in addition to the
122+
ECLAIR can generate additional report formats (e.g., DOC, ODT, XLSX) and
123+
different variants of reports in addition to the
108124
default ecd file. Following additional reports and report formats can be generated:
109125

110126
* Metrics in spreadsheet format.
@@ -125,7 +141,7 @@ default ecd file. Following additional reports and report formats can be generat
125141

126142
* Detailed report in ODT format.
127143

128-
Related cmake options:
144+
Related CMake options:
129145

130146
* ``ECLAIR_METRICS_TAB``
131147
* ``ECLAIR_REPORTS_TAB``
@@ -141,13 +157,13 @@ Detail level of full reports
141157
============================
142158

143159
The detail level of the txt and doc full reports can also be adapted by a configuration.
144-
In this case the following configurations are avilable:
160+
In this case, the following configurations are available:
145161

146162
* Show all areas
147163

148164
* Show only the first area
149165

150-
Related cmake options:
166+
Related CMake options:
151167

152168
* ``ECLAIR_FULL_DOC_ALL_AREAS``
153169
* ``ECLAIR_FULL_DOC_FIRST_AREA``

0 commit comments

Comments
 (0)