I Code CNES User Manual EN
User Manual:
Open the PDF directly: View PDF
.
Page Count: 59
i-Code CNES User Manual
Réf :
DNO/DA/AQ - 2017.0002478
Date :
24/05/2018
Page : 1/59
User Manual
i-Code CNES
DNO/DA /AQ - 2017.0002478
Version 3.0.1
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
Date : 24/05/2018
i-Code CNES User Manual
Page : 2/59
References
References
R1
Title
Eclipse documentation : http://www.eclipse.org/documentation/
R2
RNC-CNES-Q-HB-80-505 Coding rules Fortran 77 Version 7
R3
RNC-CNES-Q-HB-80-517 Coding rules Fortran 90 Version 5
R4
RNC-CNES-Q-HB-80-501 Common coding rules Version 5
R5
RNC-CNES-Q-HB-80-516 Coding rules SHELL Version 6
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 3/59
Table of contents
1. INTRODUCTION ............................................................................................................. 4
2. I-CODE CNES IDE INTEGRATED INTO ECLIPSE ......................................................... 4
I-CODE CNES CONFIGURATION................................................................................... 4
2.1.1. CONFIGURATION CHOICE ............................................................................................5
2.1.2. RULES FILTER ................................................................................................................6
2.1.3. RULES SELECTION ........................................................................................................6
2.1.4. RULE’S SEVERITY CONFIGURATION ..........................................................................7
2.1.5. METRICS’ THRESHOLD CONFIGURATION .................................................................7
2.1.6. RESTORE TO DEFAULT ................................................................................................8
CHECK RULES AND COMPUTE METRICS ................................................................... 9
2.2.1. ANALYSE LAUNCH ........................................................................................................9
2.2.2. RESULTS DISPLAY ......................................................................................................10
2.2.3. I-CODE CNES DISPLAY IN THE EDITOR ....................................................................12
2.2.4. RESULTS EXPORT .......................................................................................................13
3. I-CODE CNES COMMAND LINE .................................................................................. 15
XML FORMAT ............................................................................................................... 15
HTML FORMAT ............................................................................................................. 15
HELP DISPLAY ............................................................................................................. 15
4. RULES DESCRIPTION ................................................................................................. 16
COMMON RULES ......................................................................................................... 16
SPECIFIC RULES ......................................................................................................... 26
4.2.1. FORTRAN 77 .................................................................................................................26
4.2.2. FORTRAN 90 .................................................................................................................31
4.2.3. SHELL ............................................................................................................................43
5. COMPUTED METRICS ................................................................................................. 48
6. USER MESSAGES ........................................................................................................ 51
RULE’S VIOLATION MESSAGES ................................................................................ 51
6.1.1. REGLES COMMUNES...................................................................................................51
6.1.2. FORTRAN 77 .................................................................................................................53
6.1.3. FORTRAN 90 .................................................................................................................55
6.1.4. SHELL ............................................................................................................................57
7. LIMITATIONS ................................................................................................................ 59
POWERSHELL DOES NOT ALLOW ANALYSE LAUNCH ........................................... 59
SHELL: STRINGS SHOULD BE LIMITED WITH « » .................................................... 59
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 4/59
1. INTRODUCTION
This document is the i-Code CNES user manual. It describes how to use i-Code CNES.
Before using i-Code CNES, you should:
Know eclipse. Eclipse documentation is available here [R1].
Read CNES coding rules [R2] [R3] [R4]
2. I-CODE CNES IDE INTEGRATED INTO ECLIPSE
I-CODE CNES CONFIGURATION
The whole i-Code CNES configuration is accessible from eclipse preference pages.
To open eclipse preference pages, click on Window > Preferences
In the eclipse preference window, select the « i-Code CNES » item on the left.
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 5/59
To see all available coding rules, open up « Metrics » or “Rules” tabs.
2.1.1. CONFIGURATION CHOICE
i-Code CNES preference pages offer the user to create his own configuration, selecting the rules he wants to
check. Default configurations are of course available.
Au-dessus des volets « Metrics » et « Rules » un menu déroulant propose de sélectionner la configuration
souhaitée.
Right above the « Metric » and « Rules » tabs, a combo box permits to choose one of the predefined
configuration.
« Custom » allows the user to:
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 6/59
Activate/desactivate the rules;
Define each rule severity;
Define thresold for each metric;
If a predefined configuration is selected, no modification is possible.
2.1.2. RULES FILTER
Rules can be filtered with keyword, using for example the language name: Shell.
2.1.3. RULES SELECTION
You can select/unselect a rule using the checkbox on the left of the rule considered.
You can select/unselect all the rules using the first checkbox.
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 7/59
2.1.4. RULE’S SEVERITY CONFIGURATION
Rule criticity can be: Error / Warning / Info
It can be modified in the Severity column. No bulk change is available.
2.1.5. METRICS’ THRESHOLD CONFIGURATION
The thresholds can be modified in the « Minimum » and « Maximum » columns.
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 8/59
2.1.6. RESTORE TO DEFAULT
You can go back to the default configuration using the « Restore Defaults » button.
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 9/59
CHECK RULES AND COMPUTE METRICS
2.2.1. ANALYSE LAUNCH
Required: All the files to analyze are available into Project Explorer.
Step 1 : Select all the files you want to analyze into the Project Explorer.
Step 2: Launch the analyse from i-code CNES menu: i-Code CNES > Check Code.
The following progress bar appears. When the analyze is done, the results are displayed into « I-Code
CNES Violations » and « i-Code CNES Metrics »
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 10/59
2.2.2. RESULTS DISPLAY
2.2.2.1. I-CODE CNES VIOLATIONS
This tab displays :
Rule: name of the rule which is not respected
Line: line detection
Number of violations: total number of violations.
Message: error details
Violations on the same rule are displayed into a tree. The first level is the rule, the second level is the location.
2.2.2.1.1. Change display
The display can be changed using toolbar:
Il est donc possible de choisir une arborescence :
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 11/59
Quality analyze display : Règles > Fichiers > Functions > Violations
Development display : Fichiers > Functions > Règles > Violations
2.2.2.1.2. Results filter
It is possible to filter results in two ways:
Search toolbar: Search field allows to filter by rule name, file name, or keyword.
Severity: Checkboxes allows to directly filter on severity
2.2.2.1.3. Results sort
You can sort results using the column headers
2.2.2.2. I-CODE CNES METRICS
i-Code CNES Metrics displays all the metrics computed.
When a metric value is higher than the threshold, it is displayed in red.
This tab displays :
-
Metric : metric name
Total : total for this metric
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
Date : 24/05/2018
i-Code CNES User Manual
Page : 12/59
-
Mean : mean for this metric
Minimum : minimum value
Maximum : maximum value
2.2.3. I-CODE CNES DISPLAY IN THE EDITOR
When double click on a violation, the file is opened in the editor at the right line.
A marker on the left side displays the error details.
Error details
Double click to open the
file
In the Project Explorer, a marker is displayed on the files containing violations.
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 13/59
2.2.4. RESULTS EXPORT
Results can be exported as csv or xml file.
1. Click on Export button, in the top right in « i-Code CNES Violations » or « i-Code CNES Metrics »
2. Select export format : csv ou xml
3. Precise export file name and location.
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 14/59
4. Results file is created in the selected project
Réf : DNO/DA/AQ - 2017.0002478
CNES
DNO/DA/AQ
i-Code CNES User Manual
Date : 24/05/2018
Page : 15/59
3. I-CODE CNES COMMAND LINE
To launch an analyze with the command line version, you can use the following commands:
icode –f -output
Source Exif Data:
File Type : PDF
File Type Extension : pdf
MIME Type : application/pdf
PDF Version : 1.5
Linearized : No
Page Count : 59
Language : fr-FR
Tagged PDF : Yes
Create Date : 2018:05:24 13:27:12+02:00
Modify Date : 2018:05:24 13:27:12+02:00
EXIF Metadata provided by EXIF.tools