mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
merge changed from 18.11 into trunk.
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2151 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Mon, 24 Dec 2018 08:49:05 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]]
|
||||
@@ -19,8 +21,8 @@ The usage and options display gives you information about which options are vali
|
||||
|
||||
Usage and options of the command line compiler vary from version to version in order to accommodate new and changed features. Here is an example of the command line help from the latest version of EiffelStudio:
|
||||
|
||||
<code lang="text">
|
||||
ISE EiffelStudio version 14.05.9.5158 GPL Edition - win64
|
||||
<code lang="none">
|
||||
ISE EiffelStudio version 18.11.10.2549 GPL Edition - win64
|
||||
|
||||
Usage:
|
||||
ec [-help | [-compat | -experiment] | -version | -full
|
||||
@@ -40,22 +42,24 @@ Usage:
|
||||
-implementers [-filter filtername] class feature |
|
||||
-callers [-filter filtername] [-show_all] [-assigners | -creators] class feature |
|
||||
-callees [-filter filtername] [-show_all] [-assignees | -creators] class feature |
|
||||
[[-config config.ecf] [-target target] |
|
||||
-ace Ace (obsolete) | -project Project_file_name (obsolete)] |
|
||||
[[-config config.ecf] [-target target] [-config_option option]|
|
||||
[class_file.e [-library library_name]] |
|
||||
-stop | -no_library |
|
||||
-project_path Project_directory_path | -file File |
|
||||
-code-analysis [-cadefaults | -caloadprefs pref_file | -caclasses class ...] |
|
||||
-ca_class (-all | class) | -ca_default | -ca_rule rule | -ca_setting file |
|
||||
-gc_stats]
|
||||
|
||||
Options:
|
||||
default (no option): quick melt the system.
|
||||
|
||||
-ace: specify the Ace file (obsolete).
|
||||
-ancestors: show the ancestors of a class.
|
||||
-aversions: show the ancestor versions of a feature.
|
||||
-batch: launch the compilation without user request.
|
||||
-c_compile: launch C compilation if needed.
|
||||
-ca_class: analyze code of a class or of all non-library classes (-all).
|
||||
-ca_default: restore default code analyzer preferences.
|
||||
-ca_rule: activate code analyzer rule(s) (with settings).
|
||||
-ca_setting: load code analyzer preferences from a file.
|
||||
-callees: show the callees of a feature.
|
||||
-callers: show the callers of a feature.
|
||||
-class_file.e: specify a class file for single file compilation.
|
||||
@@ -63,6 +67,7 @@ Options:
|
||||
-clients: show the clients of a class.
|
||||
-compat: enable pre-attached type compatibility.
|
||||
-config: specify the configuration (ECF) file.
|
||||
-config_option: override configuration options of a target.
|
||||
-debug: debug the system as a command loop.
|
||||
-descendants: show the descendants of a class.
|
||||
-dversions: show the descendant versions of a feature.
|
||||
@@ -181,31 +186,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'''
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
[[Property:title|Eiffel Inspector - Analyzing Results]]
|
||||
[[Property:link_title|Analyzing Results]]
|
||||
[[Property:modification_date|Mon, 24 Dec 2018 07:44:49 GMT]]
|
||||
[[Property:publication_date|Mon, 24 Dec 2018 07:44:49 GMT]]
|
||||
[[Property:title|Code Analyzer: Interpreting Results]]
|
||||
[[Property:link_title|Interpreting Results]]
|
||||
[[Property:weight|-13]]
|
||||
[[Property:uuid|e4670791-7885-b9a0-6a1c-0d9611eb5f5d]]
|
||||
= Sorting and Filtering =
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
[[Property:title|Eiffel Inspector - Customization]]
|
||||
[[Property:modification_date|Mon, 24 Dec 2018 07:52:18 GMT]]
|
||||
[[Property:publication_date|Mon, 24 Dec 2018 07:52:18 GMT]]
|
||||
[[Property:title|Code Analyzer: Customization]]
|
||||
[[Property:link_title|Customization]]
|
||||
[[Property:weight|-12]]
|
||||
[[Property:uuid|ed86093e-fed0-04b8-6fd4-b05d5de849fc]]
|
||||
= General Preferences =
|
||||
|
||||
The ''Preferences'' button in the toolbar opens a dialog containing all preferences for the Eiffel Inspector. There you can enable and disable all rules of a certain severity, you can choose colors for the results, and there are many preferences that control the behavior of individual rules.
|
||||
The ''Preferences'' button in the toolbar opens a dialog containing all preferences for the Code Analyzer. There you can enable and disable all rules of a certain severity, you can choose colors for the results, and there are many preferences that control the behavior of individual rules.
|
||||
|
||||
[[Image:CA Preference Dialog|center|640px|Preferences]]
|
||||
|
||||
@@ -18,15 +20,15 @@ The rule-specific preferences are located in the ''Rules'' subfolder. Two prefer
|
||||
|
||||
Using the buttons in the preferences dialog one can export these preferences to an XML file or import them. This can be used for creating profiles that stretch across multiple machines. Just set the desired preferences on one machine, export them to a file, distribute this file, and import it.
|
||||
|
||||
{{note| The Eiffel Inspector preferences are separate from the general EiffelStudio preferences. Pressing ''Restore Defaults'', ''Import ...'', or ''Export ...'' ''only'' affects preferences for the Eiffel Inspector.''}}
|
||||
{{note| The Code Analyzer preferences are separate from the general EiffelStudio preferences. Pressing ''Restore Defaults'', ''Import ...'', or ''Export ...'' ''only'' affects preferences for the Code Analyzer.''}}
|
||||
|
||||
= Class Options =
|
||||
|
||||
There are cases in which you might want to customize the Eiffel Inspector for ''parts of your code'' only. The Eiffel Inspector provides a way to set options ''per class''. You can exclude a class from being checked by certain rules. Also you can declare a class to be a ''library'' or a ''non-library'' class. All class-wide options for the Eiffel Inspector are set in the ''note clause'' (after the <e>note</e> keyword).
|
||||
There are cases in which you might want to customize the Code Analyzer for ''parts of your code'' only. The Code Analyzer provides a way to set options ''per class''. You can exclude a class from being checked by certain rules. Also you can declare a class to be a ''library'' or a ''non-library'' class. All class-wide options for the Code Analyzer are set in the ''note clause'' (after the <e>note</e> keyword).
|
||||
|
||||
== Library and Non-Library Classes ==
|
||||
|
||||
If the programmer uses the default values then a rule checks all classes. But a rule can be defined (hard-coded) not to check either ''library'' or ''non-library'' classes. How does the Eiffel Inspector now know which classes are ''library'' classes and which classes are ''non-library'' classes? This is defined by the user. If, for a certain class, the user does ''not'' define anything then the class will be analyzed in every case. Only if the user declares a class to be a ''library'' class then this class will not be checked by a rule that has disabled checking library classes. The same goes for classes that are declared as ''non-library''.
|
||||
If the programmer uses the default values then a rule checks all classes. But a rule can be defined (hard-coded) not to check either ''library'' or ''non-library'' classes. How does the Code Analyzer now know which classes are ''library'' classes and which classes are ''non-library'' classes? This is defined by the user. If, for a certain class, the user does ''not'' define anything then the class will be analyzed in every case. Only if the user declares a class to be a ''library'' class then this class will not be checked by a rule that has disabled checking library classes. The same goes for classes that are declared as ''non-library''.
|
||||
|
||||
* To declare a class to be a ''library'' class add <e>ca_library : "true"</e> to the (top or bottom) indexing clause.
|
||||
* To declare a class to be a ''non-library'' class add <e>ca_library : "false"</e> to the (top or bottom) indexing clause.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
[[Property:title|Eiffel Inspector - Rules]]
|
||||
[[Property:modification_date|Mon, 24 Dec 2018 07:54:57 GMT]]
|
||||
[[Property:publication_date|Mon, 24 Dec 2018 07:54:57 GMT]]
|
||||
[[Property:title|Code Analyzer: Rules]]
|
||||
[[Property:link_title|Rules]]
|
||||
[[Property:weight|15]]
|
||||
[[Property:uuid|109ca62a-212d-8a85-eea8-ddf0f89177a1]]
|
||||
|
||||
@@ -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 ===
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Property:modification_date|Fri, 07 Dec 2018 13:53:20 GMT]]
|
||||
[[Property:modification_date|Fri, 04 Jan 2019 15:52:42 GMT]]
|
||||
[[Property:publication_date|Mon, 26 Nov 2018 10:45:37 GMT]]
|
||||
[[Property:uuid|4452B417-C538-49AF-960F-C3C2473A3AF8]]
|
||||
[[Property:title|Release notes for EiffelStudio 18.11]]
|
||||
@@ -23,14 +23,14 @@
|
||||
* Several code-generation and run-time bugs are fixed.
|
||||
|
||||
==Libraries==
|
||||
* All container classes are now `ITERABLE` that allows for iterating over them with the `across` loop and simplifies conversions between different types of containers. {{Inline-Warning|Potential incompatibility}} for descendant classes that did not implement`new_cursor`.
|
||||
* `duplicate`, `duplicate_all` and related features of container classes are now obsolete to simplify inheritance from these classes in the future. The affected effective classes now have the feature `make_from_iterable`.
|
||||
* All container classes are now <e>ITERABLE</e> that allows for iterating over them with the <e>across</e> loop and simplifies conversions between different types of containers. {{Inline-Warning|Potential incompatibility}} for descendant classes that did not implement <e>new_cursor</e>.
|
||||
* <e>duplicate</e>, <e>duplicate_all</e> and related features of container classes are now obsolete to simplify inheritance from these classes in the future. The affected effective classes now have the feature <e>make_from_iterable</e>.
|
||||
* Figures in Vision can be drawn with anti-aliasing (on Windows).
|
||||
* `HASH_TABLE` now takes arguments of type `G` instead of `detachable G` and introduces a feature `definite_item` of type `G` (in addition to the existing feature `item` of type `detachable G`).
|
||||
* <e>HASH_TABLE</e> now takes arguments of type <e>G</e> instead of <e>detachable G</e> and introduces a feature <e>definite_item</e> of type <e>G</e> (in addition to the existing feature <e>item</e> of type <e>detachable G</e>).
|
||||
* OpenSSL binding uses <code lang="text">OpenSSL 1.1.1a</code> and supports new asymmetric algorithms (RSA).
|
||||
* JWT (JSON Web Token) supports custom JWT algorithms. The associated extension library provides RSA signing algorithms.
|
||||
* Performance of the JSON parser is improved by 40% on large regular files.
|
||||
* The new function `JSON_VALUE.chained_item (a_key): JSON_VALUE` allows for expressions `json @ "person" @ "address" @ "city" ` to get associated JSON value.
|
||||
* The new function <e>JSON_VALUE.chained_item (a_key): JSON_VALUE</e> allows for expressions <e>json @ "person" @ "address" @ "city" </e> to get associated JSON value.
|
||||
* ''ROC CMS'' implements protection against cross-site scripting attacks.
|
||||
* ''EiffelWeb'' adopts nanoseconds timeout precision and supports suffixes <code lang="text">ns</code>, <code lang="text">us</code>, <code lang="text">ms</code>, <code lang="text">s</code> for the standalone connector in the initialization file.
|
||||
* ''EiffelWeb'' correctly uses the setting <code lang="text">socket.timeout</code> for ''httpd'' (before the misuse of the setting caused high CPU usage for WebSocket).
|
||||
@@ -40,7 +40,7 @@
|
||||
* Code analyzer does not report false positives for the rules about an unread variable (<code lang="text">CA020</code>) and replacement of a regular loop with an iterative form (<code lang="text">CA024</code>).
|
||||
|
||||
==Examples==
|
||||
* `processor_pool` demonstrates how a pool of active SCOOP processors can be used to execute tasks from passive regions.
|
||||
* <e>processor_pool</e> demonstrates how a pool of active SCOOP processors can be used to execute tasks from passive regions.
|
||||
----
|
||||
|
||||
See [https://dev.eiffel.com/EiffelStudio_18.11_Releases change log] for more details.
|
||||
See [https://dev.eiffel.com/EiffelStudio_18.11_Releases change log] for more details.
|
||||
|
||||
Reference in New Issue
Block a user