i-Code CNES is a static code analysis tool to help developers write code compliant with CNES coding rules for Fortran 77, Fortran 90 and Shell.
All the information on CNES standards coverage, and rules availabilities and limitations can be read in the documentation.
- Download latest i-Code version on GitHub Releases.
- Unzip i-Code archive where you need it.
- Add
icode
to your path. - Grant
icode
execution permission. - Run
icode path/to/project/directory
.
This is the core library containing all i-Code utilities for code analysis.
This is the full library containing all official checkers. It includes i-Code Core.
This is the common command line application for i-Code.
This is the common GUI application for i-Code.
The Eclipse plugin for i-Code allows to use i-Code from Eclipse IDE.
The SonarQube plugin for i-Code allows to use i-Code through SonarQube analysis. Please refer to sonar-icode-cnes-plugin for more details.
Just unzip the corresponding archive.
Just unzip the corresponding archive.
Refer to Eclipse documentation to know how to install a standard Eclipse plugin.
Refer to SonarQube documentation to know how to install a standard SonarQube plugin.
Use icode -h
to get the following help about i-Code:
usage: icode [<FILE> [...]] [-c <arg>] [-e] [-f <arg>] [-h] [-l] [-o <arg>] [-p <arg>] [-q <arg>] [-r] [-v] [-x <arg>]
Analyze Shell, F77 & F90 code to find defects & bugs.
-c,--checked-languages <arg> Comma separated list of languages checked during analysis. All by default.
-e,--exporters Display all available exporters.
-f,--export-format <arg> Set the format for result file. Default format is XML.
-h,--help Display this message.
-l,--languages Display all available languages.
-o,--output <arg> Set the name for result file. Results are displayed in standard output by default.
-p,--export-parameters <arg> Comma separated list of parameters for the export. Format is:
key1=value1,key2=value2,key3=value3. Default values depend on the chosen export plugin.
-q,--list-export-parameters <arg> Display all available parameters for the given export.
-r,--rules Display all available rules.
-v,--version Display version information.
-x,--excluded-rules <arg> Comma separated list of rules id to exclude from analysis. None by default.
Please report issues at https://github.com/lequal/i-CodeCNES/issues
You can easily rebuild all i-Code products with Maven:
git clone https://github.com/lequal/i-CodeCNES icode
cd ./icode/
mvn clean install
If you need to add some new feature, the easiest way is to implment your own plugin by forking icode-custom-plugin-example and its dedicated Developer Guide.
- FEATURE #198 > i-Code should not crash on checker error
- FEATURE #201 > Simplify logged information
- BUG #131 > Correction erreur COM.xxx
- BUG #147 > Test files may have a "contains" instead of an "equals" to check the location value
- BUG #197 > IndexOutOfBoundsException while analyzing an empty Shell script
- BUG #200 > JAXB is still used but missing in icode-library
- Complete refactoring of i-Code architecture
- Deletion of RCP in command line
- Add version argument in command line
- Run Jflex through maven #165
- Jflex version update #165
- Transform eclipse plugin into Java plugin #165
- Command line support directory as argument: files inclusion wil be recursively included #161 #157
- Deletion of parallelized checkers running #161
- Refactor test as parametrized tests #165
- Change exe to bat and bash scripts #165
- Allow to load plugins which are dropped in plugins directory #165
- Update packaging of i-Code #165
- Update CI #145
- Reintegrate RCP as a submodule using i-Code Core #165
- This 4.0.0 version integrate a whole new architecture described in https://github.com/lequal/i-CodeCNES/wiki
icode-core
: contains core feature to build analyzericode-library
: contains the minimal classes to run i-Code analyzers in a Java applicationicode-app
: a standalone command line version of i-Code analyzericode-ide
: contains the i-Code IDE version and Eclipse plugin*-language
,*-rules
and*-metrics
: contain analyzer for several languages: Shell, Fortran, ...
- The new documentation is available as a wiki https://github.com/lequal/i-CodeCNES/wiki
- A
Developer Guide
is now available here: https://github.com/lequal/icode-custom-plugin-example/wiki/Developer-guide - Users are able to add custom plugins by putting their
jar
files intoicode/plugins/
directory - Bug about recursive analysis is fixed and users can now simply analyze a directory, e.g.:
icode .
- The continuous integration was enhanced with Travis(https://travis-ci.org/lequal/i-CodeCNES) and SonarCloud(https://sonarcloud.io/dashboard?id=lequal_i-CodeCNES)
- The contributing page and issue templates were updated
- Eclipse RCP was removed from core features of i-Code
- Some other minor enhancements and fixes
- Fix #157: Recursive search of files for analysis command line enhancement
- Fix #145: Connect i-Code build to SonarCloud enhancement
- Fix #142: Add i-Code version to the xml results file enhancement
- Fix #166: Bad support of heredoc notations bug shell
- Fix #165: Refactor i-Code architecture enhancement
- Fix #161: Files handling and recursive analysis issue command line fortran to analyse
- Fix #170: Combined standalone subroutine + module in same file is crashing scanner in FORTRAN file fortran
- Fix #159: SHDESIGNOptions false positive false positive shell
- Fix #168: icode commandline gives incorrect and cryptic error when encountering '))' bug shell
- Fix #158: Inconsistency between "RNC shell SH.FLOW.CheckUser example" and "I-code COMDESIGNActiveWait LEX" false positive shell
- Fix #186: Links in README point to sonar-icode bug documentation
- Fix #187: Consolidate community documentation documentation
- New command line #133
- New parsing error handling, a violation named "Parser error" is added instead of suspend the analysis. #154
- New rules (Shell)
- COM.DATA.Initialisation ( fix #113 )
- COM.DATA.Invariant ( fix #114 )
- COM.FLOW.FilePath ( fix #115 )
- COM.FLOW.Recursion ( fix #116 )
- COM.INST.BoolNegation ( fix #117 )
- COM.NAME.Homonymy ( fix #118 )
- COM.PRES.Indent ( fix #119 )
- COM.PRES.LengthLine ( fix #120 )
- SH.FLOW.CheckCodeReturn ( fix #121 )
- SH.Ref.Export ( fix #122 #52 #138 #137 )
- SH.SYNC.Signals #123
- New metrics
- SH.MET.LineOfComment
- F77.MET.LineOfComment
- F90.MET.LineOfComment
- Shell
- All checkers :
- Function correction on FUNCSTART and FNAME #138 #137 #150
- COM.FLOW.CaseSwitch :
- Case handling fixed #135
- Function localization fixed #52
- COM.DATA.LoopCondition
- Function localization fixed #52
- COM.DESIGN.ActiveWait
- Function localization fixed #52
- COM.FLOW.Abort
- Function localization fixed #52
- All checkers :
- Fix of Eclipse's plug-in performances #101
- Command line for Windows, MacOS & Linux #64
- Standalone version i-Code CNES IDE #1
- New Extension Points
- To add languages #32
- To add checkers #23
- To add configurations
- To add exports #19 #26
- API
- To run analysis #16
- To export analysis #19 #26
- To reach configurations & preferences
- Shells metrics (SH.MET.LineOfCode, SH.MET.RatioComment, SH.MET.Nesting, SH.MET.ComplexitySimplified) #30
- Automated build #1
- Analysis performances improvements #14
- User Interface preference page improvements #36
- Improvements of analysis failure notifications #50
- XML and CSV export improvements #69 #19
Minor fixes and other enhancements : milestone 3.0.0.
Contact : L-lequal@cnes.fr
Bugs and feature requests: https://github.com/lequal/i-CodeCNES/issues
If you experienced a problem with the plugin please open an issue. Inside this issue please explain us how to reproduce this issue and paste the log.
If you want to do a PR, please put inside of it the reason of this pull request. If this pull request fix an issue please insert the number of the issue or explain inside of the PR how to reproduce this issue.
Copyright 2019 LEQUAL.
This software is licensed under the terms in the file named "LICENSE" in this directory.
The software used Java files, generated with JFlex (http://.jflex.de). The terms of this library license are available here after : http://jflex.de/copying.html