Skip to content

Commit

Permalink
Merge pull request #223 from cnescatlab/develop
Browse files Browse the repository at this point in the history
Release of i-Code CNES 4.1.1
  • Loading branch information
begarco authored Aug 2, 2022
2 parents 1717bdf + a444a91 commit 3fac3dc
Show file tree
Hide file tree
Showing 216 changed files with 252 additions and 193 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

> **Before posting a new question, please read the documentation](https://github.com/lequal/i-CodeCNES/wiki) and check [existing issues](https://github.com/lequal/i-CodeCNES/issues)**
> **Before posting a new question, please read the documentation](https://github.com/cnescatlab/i-CodeCNES/wiki) and check [existing issues](https://github.com/cnescatlab/i-CodeCNES/issues)**
**Describe what you need to know**
A clear and concise description of what your question is.
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ What types of changes does your code introduce to i-Code?

> _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
- [ ] I have read the [CONTRIBUTING](https://github.com/lequal/i-CodeCNES/blob/master/CONTRIBUTING.md) doc
- [ ] I agree with the [CODE OF CONDUCT](https://github.com/lequal/i-CodeCNES/blob/master/CONTRIBUTING.md)
- [ ] I have read the [CONTRIBUTING](https://github.com/cnescatlab/i-CodeCNES/blob/master/CONTRIBUTING.md) doc
- [ ] I agree with the [CODE OF CONDUCT](https://github.com/cnescatlab/i-CodeCNES/blob/master/CONTRIBUTING.md)
- [ ] Lint and unit tests pass locally with my changes
- [ ] SonarCloud and Travis CI tests pass with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jdk:

addons:
sonarcloud:
organization: "lequal"
organization: "cnescatlab"
token:
secure: "XrTPbT5js+N1quKghtNNwb+F911kkREvm1ucDUb6vBwfGY5n/du9Mas5R632HuV/s8pJcJGi66NwzxhjaZGzvsNT+WhhRzeOTunpPSXzrW1wkN3cYyiURqN7p7c+YhmGVtymgiDmWh9/hamxsWp7PsmnGsAHe8U/omhV/7riU73/AwPahdeAaLdRegUrEvL9814q88d7g6A9gPFssPq9p+NLGP1J7zyNEWfHz59i0GRKFtmBTvqhONvFsostTZ1F+MJRv+Z5YIVCzkiOr99TRYrIQCwBmTXNWp/pZyKTV2xahhdY1UFY7Mtk4IUzrGhTBwaqsazMwF5EI2qdL0oKTabNEQoLtJoIA+vVLS9vONf3/zijcGnMQZvtI0M7HaXuAdIdXXpj/OZdPSrqZy1rVy7RQWoTyK4Wv8jwls3Ocrbpojo/uaSJk4t/iCyToURgQzTPPbeSkX52fFt0ylOnCEQVm8OSjcnx3WeM5jm8moaPXGsJjSvsUjGbyVWwTiqe/oAY1vJDY6TT11+v4mCmLyv21AQg16euMhuSQMKaml/F8Gt/th0Yr1HCXn6Vcw7fwU9IX2sbFrTlip7e4XQ/ohZXuM37IjG/9CrqFU2AI55HneQXERH7qkMTEiZOTYg7vbHZkzzBLTBlPEwtmlnYSObiOq2BFXxzY1wgP3jGTVQ="

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at L-lequal@cnes.fr. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at catlab@cnes.fr. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to i-Code CNES
First off, thanks for taking the time to contribute!
The following is a set of guidelines for contributing to i-Code Cnes, which are hosted in the [Lequal Organization](https://github.com/lequal) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
The following is a set of guidelines for contributing to i-Code Cnes, which are hosted in the [CATLab Organization](https://github.com/cnescatlab) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

#### Table Of Contents
+ [Code of Conduct](#code-of-conduct)
Expand All @@ -11,7 +11,7 @@ The following is a set of guidelines for contributing to i-Code Cnes, which are
* [Git Commit Messages](#git-commit-messages)

## Code of Conduct
This project and everyone participating in it is governed by the [Lequal Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [L-lequal@cnes.fr](mailto:L-lequal@cnes.fr).
This project and everyone participating in it is governed by the [CATLab Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [catlab@cnes.fr](mailto:catlab@cnes.fr).

## How Can I Contribute?

Expand All @@ -32,7 +32,7 @@ Explain the problem and include additional details to help maintainers reproduce

Provide more context by answering these questions:
* **Did the problem start happening recently** (e.g. after updating to a new version of the plugin or SonarQube) or was this always a problem?
* If the problem started happening recently, **can you reproduce the problem in an older version?** What's the most recent version in which the problem doesn't happen? You can download older versions from [the releases page](https://github.com/lequal/i-CodeCNES/releases).
* If the problem started happening recently, **can you reproduce the problem in an older version?** What's the most recent version in which the problem doesn't happen? You can download older versions from [the releases page](https://github.com/cnescatlab/i-CodeCNES/releases).
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.

Include details about your configuration and environment:
Expand Down Expand Up @@ -72,7 +72,7 @@ Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com

All contributions are welcome. They are made via a *pull request* on the branch `dev` which is the branch of the next version.

* pull request with **major** changes must be approved by at least one maintainer of each team and the LEQUAL.
* pull request with **major** changes must be approved by at least one maintainer of each team and the CNES CatLab.

* pull requests with **minor** changes must be approved by at least one organization's member.

Expand Down
46 changes: 25 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
![i-Code logo](https://github.com/lequal/i-CodeCNES/blob/master/img/logo-i-code-cnes.png)
![i-Code logo](https://github.com/cnescatlab/i-CodeCNES/blob/master/img/logo-i-code-cnes.png)

[![Build Status](https://travis-ci.org/lequal/i-CodeCNES.svg?branch=master)](https://travis-ci.org/lequal/i-CodeCNES)
[![Build Status](https://travis-ci.org/cnescatlab/i-CodeCNES.svg?branch=master)](https://travis-ci.org/cnescatlab/i-CodeCNES)
[![SonarQube Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=lequal_i-CodeCNES&metric=alert_status)](https://sonarcloud.io/dashboard?id=lequal_i-CodeCNES)
[![SonarQube Bugs](https://sonarcloud.io/api/project_badges/measure?project=lequal_i-CodeCNES&metric=bugs)](https://sonarcloud.io/project/issues?id=lequal_i-CodeCNES&resolved=false&types=BUG)
[![SonarQube Coverage](https://sonarcloud.io/api/project_badges/measure?project=lequal_i-CodeCNES&metric=coverage)](https://sonarcloud.io/component_measures?id=lequal_i-CodeCNES&metric=Coverage)
[![SonarQube Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=lequal_i-CodeCNES&metric=sqale_index)](https://sonarcloud.io/component_measures?id=lequal_i-CodeCNES&metric=Maintainability)

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](https://github.com/lequal/i-CodeCNES/wiki).
All the information on CNES standards coverage, and rules availabilities and limitations can be read in the [documentation](https://github.com/cnescatlab/i-CodeCNES/wiki).

## Quick start
- Download latest i-Code version on [GitHub Releases](https://github.com/lequal/i-CodeCNES/releases).
- Download latest i-Code version on [GitHub Releases](https://github.com/cnescatlab/i-CodeCNES/releases).
- Unzip i-Code archive where you need it.
- Add `icode` to your path.
- Grant `icode` execution permission.
Expand All @@ -30,7 +30,7 @@ This is the common GUI application for i-Code.
##### i-Code plugin for Eclipse
The Eclipse plugin for i-Code allows to use i-Code from Eclipse IDE.
##### i-Code plugin for SonarQube
The SonarQube plugin for i-Code allows to use i-Code through SonarQube analysis. Please refer to [sonar-icode-cnes-plugin](https://github.com/lequal/sonar-icode-cnes-plugin) for more details.
The SonarQube plugin for i-Code allows to use i-Code through SonarQube analysis. Please refer to [sonar-icode-cnes-plugin](https://github.com/cnescatlab/sonar-icode-cnes-plugin) for more details.

## Installation
##### i-Code CLI
Expand Down Expand Up @@ -65,22 +65,26 @@ Analyze Shell, F77 & F90 code to find defects & bugs.
-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
Please report issues at https://github.com/cnescatlab/i-CodeCNES/issues
```

## Build
You can easily rebuild all i-Code products with Maven:
```bash
git clone https://github.com/lequal/i-CodeCNES icode
git clone https://github.com/cnescatlab/i-CodeCNES icode
cd ./icode/
mvn clean install
```

## Extending i-Code with your own plugin
If you need to add some new feature, the easiest way is to implment your own plugin by forking [icode-custom-plugin-example](https://github.com/lequal/icode-custom-plugin-example) and its dedicated [Developer Guide](https://github.com/lequal/icode-custom-plugin-example/wiki/Developer-guide).
If you need to add some new feature, the easiest way is to implment your own plugin by forking [icode-custom-plugin-example](https://github.com/cnescatlab/icode-custom-plugin-example) and its dedicated [Developer Guide](https://github.com/cnescatlab/icode-custom-plugin-example/wiki/Developer-guide).

## Changelog

#### Release 4.1.1
###### Fixed bugs
- [x] **BUG #221** > Too many open files

#### Release 4.1.0

###### New features
Expand Down Expand Up @@ -110,17 +114,17 @@ If you need to add some new feature, the easiest way is to implment your own plu
- 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
- This 4.0.0 version integrate a whole new architecture described in https://github.com/cnescatlab/i-CodeCNES/wiki
- `icode-core`: contains core feature to build analyzer
- `icode-library`: contains the minimal classes to run i-Code analyzers in a Java application
- `icode-app`: a standalone command line version of i-Code analyzer
- `icode-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
- The new documentation is available as a wiki https://github.com/cnescatlab/i-CodeCNES/wiki
- A `Developer Guide` is now available here: https://github.com/cnescatlab/icode-custom-plugin-example/wiki/Developer-guide
- Users are able to add custom plugins by putting their `jar` files into `icode/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 continuous integration was enhanced with Travis(https://travis-ci.org/cnescatlab/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
Expand Down Expand Up @@ -200,28 +204,28 @@ If you need to add some new feature, the easiest way is to implment your own plu
* Improvements of analysis failure notifications #50
* XML and CSV export improvements #69  #19

*Minor fixes and other enhancements : [milestone 3.0.0](https://github.com/lequal/i-CodeCNES/milestone/1).*
*Minor fixes and other enhancements : [milestone 3.0.0](https://github.com/cnescatlab/i-CodeCNES/milestone/1).*

### Previous Releases
* [Release 3.1.0](https://github.com/lequal/i-CodeCNES/releases/tag/v3.1.0)
* [Release 3.0.1](https://github.com/lequal/i-CodeCNES/releases/tag/v3.0.1)
* [Release 3.0.0](https://github.com/lequal/i-CodeCNES/releases/tag/v3.0.0)
* [Release 2.0.0](https://github.com/lequal/i-CodeCNES/releases/tag/v2.0.0)
* [Release 1.0.0](https://github.com/lequal/i-CodeCNES/releases/tag/v1.0.0)
* [Release 3.1.0](https://github.com/cnescatlab/i-CodeCNES/releases/tag/v3.1.0)
* [Release 3.0.1](https://github.com/cnescatlab/i-CodeCNES/releases/tag/v3.0.1)
* [Release 3.0.0](https://github.com/cnescatlab/i-CodeCNES/releases/tag/v3.0.0)
* [Release 2.0.0](https://github.com/cnescatlab/i-CodeCNES/releases/tag/v2.0.0)
* [Release 1.0.0](https://github.com/cnescatlab/i-CodeCNES/releases/tag/v1.0.0)


### Feedback and Support
Contact : L-lequal@cnes.fr
Contact : catlab@cnes.fr

Bugs and feature requests: https://github.com/lequal/i-CodeCNES/issues
Bugs and feature requests: https://github.com/cnescatlab/i-CodeCNES/issues

### How to contribute
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.

### License
Copyright 2019 LEQUAL.
Copyright 2022 CATLab.

This software is licensed under the terms in the file named "LICENSE" in this directory.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
fileValue.setFileValue(valueOfFile);
return fileValue;
%eofval}
%eofclose

/* Here is where you can declare transition words for the Metric. */
METRIC_WORD = first_word | SECOND_WORD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
this.computeMetric(null, Float.NaN, 0);
return getCheckResults();
%eofval}
%eofclose
%%

/* This is the general automaton. Each part will be described later. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ SPACE = [\ \r\f\t]
this.computeMetric(null, numTotal, 0);
return getCheckResults();
%eofval}
%eofclose
%%

/************************************************************************/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ END = END | end
this.computeMetric(null, numCommentTotal, 0);
return getCheckResults();
%eofval}

%eofclose
%%

/*********************/
Expand Down
1 change: 1 addition & 0 deletions fortran77-metrics/src/main/resources/lex/F77METNesting.lex
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ SMBL = \& | \+ | \$
this.computeMetric(null, Float.NaN, 0);
return getCheckResults();
%eofval}
%eofclose
%%

/* This is the general automaton. Each part will be described later. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ END = END | end
this.computeMetric(null, Float.NaN, 0);
return getCheckResults();
%eofval}

%eofclose
%%

/*********************/
Expand Down
2 changes: 1 addition & 1 deletion fortran77-rules/src/main/resources/example/ExampleRule.lex
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
%eofval{
return violations;
%eofval}

%eofclose
/* Here is where you can declare transition words for the rule. */
RULE_WORD = first_word | SECOND_WORD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"

return getCheckResults();
%eofval}
%eofclose

/* Transition word are real, complex and double precision. Whenever this word is */
/* encountered, we store all variables declared. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ SEE_FUNC = ([^a-zA-Z0-9\_])?("if" | "elseif" | "forall" | "while" | "where" | "
displayErrorVariableByType();
return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"

return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
%eofval{
return getCheckResults();
%eofval}

%eofclose
/* Transition word is do (or DO). If this word is met, we focus on out condition */
/* end verifies that it's not modified within the DO-loop. If WHILE is found, */
/* nothing has to be done. We also look for END, which means modification can be */
Expand Down
2 changes: 1 addition & 1 deletion fortran77-rules/src/main/resources/lex/COMDATANotUsed.lex
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ EQUAL = \= [^\,\n\"\']*

return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ WAIT = "sleep" | "wait" | "pause"
%eofval{
return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
2 changes: 1 addition & 1 deletion fortran77-rules/src/main/resources/lex/COMDESIGNAlloc.lex
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ INT = [0-9]+
sortResults();
return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
1 change: 1 addition & 0 deletions fortran77-rules/src/main/resources/lex/COMFLOWAbort.lex
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
%eofval{
return getCheckResults();
%eofval}
%eofclose


%%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ VAR = [a-zA-Z][a-zA-Z0-9\_]*
%eofval{
return getCheckResults();
%eofval}
%eofclose


%%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ AVOIDED = {SPACE}*( "abs" | "achar" | "acos" | "acosh" | "adjustl" | "adjustr"
sortResults();
return getCheckResults();
%eofval}
%eofclose


%%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ GETUID = "GETUID"{SPACE}*\({SPACE}*\)
}
return getCheckResults();
%eofval}
%eofclose


%%
Expand Down
1 change: 1 addition & 0 deletions fortran77-rules/src/main/resources/lex/COMFLOWExit.lex
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
%eofval{
return getCheckResults();
%eofval}
%eofclose


%%
Expand Down
1 change: 1 addition & 0 deletions fortran77-rules/src/main/resources/lex/COMFLOWExitLoop.lex
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
%eofval{
return getCheckResults();
%eofval}
%eofclose

/* Transition word are STOP, EXIT, CYCLE and GO TO. If these words are met inside */
/* a DO-loop, an error is thrown. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ STRING = \'[^\']*\' | \"[^\"]*\"
%eofval{
return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
2 changes: 1 addition & 1 deletion fortran77-rules/src/main/resources/lex/COMFLOWFilePath.lex
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ FILENAME = \'[\.]*[a-zA-Z\/][a-zA-Z0-9\_\/]*(\.[a-zA-Z0-9]+)?\' |
%eofval{
return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ VAR = [a-zA-Z][a-zA-Z0-9\_]*
%eofval{
return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
2 changes: 1 addition & 1 deletion fortran77-rules/src/main/resources/lex/COMINSTBrace.lex
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SPACE = [\ \r\t\f]
%eofval{
return getCheckResults();
%eofval}

%eofclose

%%

Expand Down
Loading

0 comments on commit 3fac3dc

Please sign in to comment.