mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Updated naming of the tool.
Updated wikipage Running the Code Analyzer. (Signed-off-by:alexk). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2119 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
[[Property:title|Eiffel Inspector - Running the Analyzer]]
|
||||
[[Property:modification_date|Mon, 24 Dec 2018 07:41:32 GMT]]
|
||||
[[Property:publication_date|Mon, 24 Dec 2018 07:41:32 GMT]]
|
||||
[[Property:title|Running the Code Analyzer]]
|
||||
[[Property:link_title|Running the Analyzer]]
|
||||
[[Property:weight|-14]]
|
||||
[[Property:uuid|d672c769-57fb-6b87-2781-83daff3ab9e7]]
|
||||
= General =
|
||||
|
||||
There are several different ways of running the Eiffel Inspector. Most importantly, you can select the scope of the analysis. For example it is possible to analyze a single class, a cluster or a whole system. Also for the same scope there are different ways of running the analyzer depending on your personal preferences. To perform the analysis the Eiffel system which will be analyzed must compile without any error.
|
||||
There are several different ways of running the Code Analyzer. Most importantly, you can select the scope of the analysis. For example it is possible to analyze a single class, a cluster or a whole system. Also for the same scope there are different ways of running the analyzer depending on your personal preferences. To perform the analysis the Eiffel system which will be analyzed must compile without any error.
|
||||
|
||||
There are two ways of running the Eiffel Inspector
|
||||
# Using the GUI, the Eiffel Inspector Tool appears as a panel. The panel is mainly used for displaying analysis results. The command to perform the analysis can be found not only in the panel but also in various context menus making it easy to analyze specific classes or sets of classes.
|
||||
There are two ways of running the Code Analyzer
|
||||
# Using the GUI, the Code Analyzer Tool appears as a panel. The panel is mainly used for displaying analysis results. The command to perform the analysis can be found not only in the panel but also in various context menus making it easy to analyze specific classes or sets of classes.
|
||||
# Using command-line arguments with the command-line version of EiffelStudio. The system is compiled (if necessary) and then analyzed. The output of the analysis will be directed to the terminal window.
|
||||
|
||||
= GUI =
|
||||
@@ -25,13 +27,13 @@ Left-clicking the '''Analyze Item''' button in the toolbar will start an analysi
|
||||
|
||||
=== Any Class ===
|
||||
There are two ways of analyzing an arbitrary class (either from your system or from a library):
|
||||
* Right-click on a class name and select '''Run Eiffel Inspector on Class...''' from the context menu:
|
||||
* Right-click on a class name and select '''Analyze Class...''' from the context menu:
|
||||
[[Image:CA Class Context Menu|center|371px|Class Context Menu]]
|
||||
* Pick a class and drop it on the '''Analyze Item''' button.
|
||||
|
||||
=== Clusters ===
|
||||
To analyze a cluster there are two possibilities, like for classes:
|
||||
* You can either right-click the cluster and select '''Run Eiffel Inspector on cluster''' from the context menu:
|
||||
* You can either right-click the cluster and select '''Analyze cluster''' from the context menu:
|
||||
[[Image:CA Cluster Context Menu|center|247px|Cluster Context Menu]]
|
||||
* Pick a cluster and drop it on the '''Analyze Item''' button.
|
||||
|
||||
@@ -40,7 +42,7 @@ Not only clusters but any other elements of a project (such as a library) can be
|
||||
|
||||
|
||||
=Command Line=
|
||||
The Eiffel Inspector is also available from the EiffelStudio command line compiler by using the '''-code-analysis''' command. The results will be displayed in the terminal window or to a file.
|
||||
The Code Analyzer is also available from the EiffelStudio command line compiler by using the '''-code-analysis''' command. The results will be displayed in the terminal window or to a file.
|
||||
|
||||
== Execution / Command Line Options ==
|
||||
|
||||
@@ -49,7 +51,7 @@ The following command will perform a code analysis:
|
||||
ec.exe -config project.ecf -code-analysis [-cadefaults] [-caloadprefs ''preffile''] [-caclass ''CLASS1 CLASS2 ...'']
|
||||
[-caforcerules "RULE1 (First preference=1, Second preference=2) RULE2"]
|
||||
|
||||
The arguments in brackets are optional. For a complete description of the Eiffel inspector command line options see [[EiffelStudio: Using command line options|Using command line compiler options]].
|
||||
The arguments in brackets are optional. For a complete description of the Code Analyzer command line options see [[EiffelStudio: Using command line options|Using command line compiler options]].
|
||||
|
||||
EiffelStudio will try to compile the system if needed. The analysis will only work with syntactically correct code and a compiled system. Should the compilation fail, EiffelStudio will abort and the analysis will not start.
|
||||
|
||||
@@ -58,7 +60,7 @@ Upon a successful compilation either the whole system or the classes mentioned i
|
||||
|
||||
As soon as everything needed has been analyzed the results will be displayed as a list of rule violations. These rule violations are sorted by class and by location. In addition to the name of the violated rule and the rule ID, a description of the concrete violation will be displayed as well.
|
||||
|
||||
[[Image:Eiffel Inspector Command Line|center|877px|Eiffel Inspector - Command Line]]
|
||||
[[Image:Eiffel Inspector Command Line|center|877px|Code Analyzer - Command Line]]
|
||||
|
||||
=== Output to file ===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user