mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 14:52:03 +01:00
Updated code analyzer options.
Updated wikipage EiffelStudio: Using command line options. (Signed-off-by:alexk). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2123 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Mon, 24 Dec 2018 08:45:22 GMT]]
|
||||
[[Property:publication_date|Mon, 24 Dec 2018 08:45:22 GMT]]
|
||||
[[Property:title|EiffelStudio: Using command line options]]
|
||||
[[Property:link_title|Using command line options]]
|
||||
[[Property:weight|1]]
|
||||
@@ -181,31 +183,29 @@ To produce documentation for a view other than ''Text'', use its option in the c
|
||||
ec -flatshort -filter html-stylesheet -all -config application.ecf
|
||||
</code>
|
||||
|
||||
==Commands for Eiffel Inspector==
|
||||
To start the Eiffel Inspector you need to pass the '''-code-analysis''' command line options. If no other options are given, it will analyze the whole system. To specify some preferences, enable specific rules or analyze part of a system, you will need to provide some more options described below:
|
||||
==Commands for the Code Analyzer==
|
||||
The Code Analyzer is invoked when an option to analyze the whole system or a particular class is specified in the command line. Additional command-line options are used to specify some preferences and to enable specific rules:
|
||||
|
||||
<code lang="text">
|
||||
ec -config project.ecf -code-analysis [-cadefaults | -caloadprefs pref_file | -caclasses "CLASS1 CLASS2" |
|
||||
-caforcerules "RULE1 (First preference=1, Second preference=2) RULE2"]
|
||||
<code lang="shell">
|
||||
ec -config project.ecf [-ca_class (-all | <CLASS_NAME(S)>) | -ca_default | -ca_rule <RULE_SPEC(S)> | -ca_setting <FILE_NAME>]
|
||||
</code>
|
||||
|
||||
; -cadefaults : If provided, all preferences regarding the analysis will be reset to their default values (before the analysis is run). For example this leads to enabling all rules that are enabled by default, no matter whether they have been disabled before.
|
||||
;<code lang="shell">-ca_default</code>: Requests to reset all Code Analyzer preferences to their default values before the analysis is run. For example, this enables all rules that are enabled by default, no matter whether they have been disabled before.
|
||||
|
||||
; -caloadprefs : Use preferences from ''pref_file'', an XML file containing the code analysis preferences. ''pref_file'' can be generated by exporting the current preferences in the GUI.
|
||||
;<code lang="shell">-ca_setting</code>: Requests to use preferences from the specified file. The file is generated by exporting the current preferences from the GUI.
|
||||
|
||||
; -caclass : Followed by a list of class names (without file extension ''.e'') of the classes that shall be analyzed. If omitted then the whole system will be analyzed. If more than one class is to be specified, the list must be wrapped in double quotes. The class names can optionally be separated by semicolons ("CLASS1; CLASS2").
|
||||
;<code lang="shell">-ca_class</code>: Asks to analyze a given class or a set of classes. Several class names can be specified, separated either by spaces or semicolons. In that case, the argument may need to be enclosed in double quotes (e.g., `"CLASS1; CLASS2"`). A special value `-all` triggers analysis of the whole system.
|
||||
|
||||
; -caforcerules: Followed by a list of rules, enables those rules for the analysis and disables all the others, overriding the current preferences. Specific rule preferences can also be provided in parentheses. Preferences must be separated by commas. The class names can optionally be separated by semicolons. The following example summarizes the syntax of this option:
|
||||
;<code lang="shell">-ca_rule</code>: Followed by a list of rules, enables those rules for the analysis and disables all the others, overriding the current preferences. Specific rule preferences can also be provided in parentheses. Preferences are separated by commas. The rule names can optionally be separated by semicolons. Example:
|
||||
|
||||
<code lang="text">
|
||||
-caforcerules "RULE1; RULE2 (Maximum length threshold=20, Enable something=False); RULE3"
|
||||
<code lang="shell">
|
||||
-ca_rule "CA001; CA033 (maximum_feature_count=10; maximum_instruction_count=100); CA066 (enforce_prefix=False)"
|
||||
</code>
|
||||
|
||||
==Command options==
|
||||
|
||||
The table below lists the available ''options'', the arguments they require, and their effect:
|
||||
|
||||
|
||||
{| border="1"
|
||||
|-
|
||||
| width="175pt" | '''OPTION'''
|
||||
|
||||
Reference in New Issue
Block a user