Skip to content

Commit

Permalink
Set version to 4.1.0, fix QA issues and complete README
Browse files Browse the repository at this point in the history
  • Loading branch information
begarco committed Apr 8, 2020
1 parent cf06cd7 commit 377dab1
Show file tree
Hide file tree
Showing 22 changed files with 103 additions and 55 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: java
install: true

os:
- linux
os: linux
dist: xenial

jdk:
- openjdk11
Expand All @@ -14,8 +14,7 @@ addons:
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="

script:
- mvn clean install
- sonar-scanner -Dsonar.branch.name="$TRAVIS_BRANCH"
- mvn clean install sonar:sonar

cache:
directories:
Expand All @@ -27,13 +26,13 @@ notifications:

deploy:
provider: releases
api_key: "$GITHUB_TOKEN"
token: "$GITHUB_TOKEN"
file_glob: true
file:
- "icode-app/target/icode-*.zip"
- "icode-ide/fr.cnes.icode.repository/target/products/icode-ide.product-*.zip"
- "icode-ide/fr.cnes.icode.repository/target/fr.cnes.icode.repository-*.zip"
skip_cleanup: true
cleanup: false
name: "i-Code CNES"
draft: true
on:
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ If you need to add some new feature, the easiest way is to implment your own plu

## Changelog

#### Release 4.1.0

###### New features
- [x] **FEATURE #198** > i-Code should not crash on checker error
- [x] **FEATURE #201** > Simplify logged information

###### Fixed bugs
- [x] **BUG #131** > Correction erreur COM.xxx
- [x] **BUG #147** > Test files may have a "contains" instead of an "equals" to check the location value
- [x] **BUG #197** > IndexOutOfBoundsException while analyzing an empty Shell script
- [x] **BUG #200** > JAXB is still used but missing in icode-library

#### Release 4.0.0

###### New features
Expand Down
13 changes: 0 additions & 13 deletions icode-core/src/main/java/fr/cnes/icode/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.google.common.collect.Maps;
import fr.cnes.icode.data.AbstractChecker;
import fr.cnes.icode.data.CheckResult;
import fr.cnes.icode.exception.JFlexException;
import fr.cnes.icode.logger.ICodeLogger;
import fr.cnes.icode.services.checkers.CheckerContainer;
import fr.cnes.icode.services.checkers.CheckerService;
Expand All @@ -21,10 +20,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

/**
* <h1>i-Code CNES Analyzer service</h1>
Expand All @@ -49,14 +44,6 @@
*/
public class Analyzer {

/** Number of thread to run the analysis */
private static final int THREAD_NB = Runtime.getRuntime().availableProcessors();

/**
* Define ratio of max memory allocated to the JVM to use for the analysis.
*/
private static final double MAX_MEMORY_THRESHOLD = 0.90;

/**
* <h1>{@link #stableCheck(Set, List, List)}</h1>
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public final void addFromResources(final String file) {
final InputStream checkersFile = this.getClass().getResourceAsStream(file);
try {
final CheckersList checkers = (CheckersList) XmlHandler.unmarshal(checkersFile);
addAll(checkers.containers);
addAll(checkers.getCheckers());
} catch (final Exception e) {
ICodeLogger.error(getClass().getName(), "addFromResources", e);
}
Expand Down
19 changes: 18 additions & 1 deletion icode-core/src/main/java/fr/cnes/icode/data/CheckersList.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class CheckersList {

/** List of checkers defined in a plugin. **/
public List<CheckerContainer> containers;
private List<CheckerContainer> containers;

/**
* Default constructor.
Expand All @@ -25,4 +25,21 @@ public CheckersList() {
this.containers = Lists.newArrayList();
}

/**
* Get all the checkers contained in the list.
*
* @return Checkers as CheckerContainer list.
*/
public List<CheckerContainer> getCheckers() {
return containers;
}

/**
* Add a checker into the list.
*
* @param checker A simple CheckerContainer.
*/
public void addChecker(final CheckerContainer checker) {
this.containers.add(checker);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static Object unmarshal(final InputStream file){
classFromString(map.get("class").toString()),
(boolean) map.getOrDefault("isMetric", false));

checkersList.containers.add(container);
checkersList.getCheckers().add(container);
}

return checkersList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class CheckerContainer {

/** Class name **/
private final String CLASS = CheckerContainer.class.getName();
private static final String CLASS = CheckerContainer.class.getName();

/** Checker identifier */
private String id;
Expand Down
4 changes: 2 additions & 2 deletions icode-ide/fr.cnes.analysis.tools.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: i-Code CNES UI
Bundle-SymbolicName: fr.cnes.analysis.tools.ui;singleton:=true
Bundle-Version: 4.0.0.qualifier
Bundle-Version: 4.1.0.qualifier
Bundle-Activator: fr.cnes.analysis.tools.ui.Activator
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.11.0",
org.eclipse.ui;bundle-version="3.107.0",
Expand All @@ -16,7 +16,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.11.0",
org.eclipse.ui.editors;bundle-version="3.9.0",
org.eclipse.e4.core.di;bundle-version="1.6.0",
org.eclipse.jface,
icode.library.plugin;bundle-version="4.0.0"
icode.library.plugin;bundle-version="4.1.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: fr.cnes.analysis.tools.ui.exception,
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/fr.cnes.analysis.tools.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>fr.cnes.analysis.tools.ui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/fr.cnes.icode.feature.ui/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="fr.cnes.icode.feature.ui"
label="i-Code CNES UI"
version="4.0.0.qualifier"
version="4.1.0.qualifier"
provider-name="CNES">

<description url="http://www.example.com/description">
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/fr.cnes.icode.feature.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>fr.cnes.icode.feature.ui</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions icode-ide/fr.cnes.icode.repository/category.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/fr.cnes.icode.feature.ui_4.0.0.qualifier.jar" id="fr.cnes.icode.feature.ui"
version="4.0.0.qualifier">
<feature url="features/fr.cnes.icode.feature.ui_4.1.0.qualifier.jar" id="fr.cnes.icode.feature.ui"
version="4.1.0.qualifier">
<category name="fr.cnes.icode"/>
</feature>
<category-def name="fr.cnes.icode" label="i-Code CNES"/>
Expand Down
4 changes: 2 additions & 2 deletions icode-ide/fr.cnes.icode.repository/icode-ide.product
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="i-Code CNES IDE" uid="icode-ide.product" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="4.0.0" useFeatures="true" includeLaunchers="true">
<product name="i-Code CNES IDE" uid="icode-ide.product" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="4.1.0" useFeatures="true" includeLaunchers="true">


<configIni use="default">
Expand Down Expand Up @@ -73,7 +73,7 @@
<feature id="org.eclipse.cdt.gnu.debug"/>
<feature id="org.eclipse.cdt.gdb"/>
<feature id="org.eclipse.e4.rcp"/>
<feature id="fr.cnes.icode.feature.ui" version="4.0.0.qualifier"/>
<feature id="fr.cnes.icode.feature.ui" version="4.1.0.qualifier"/>
<feature id="icode.library.feature" installMode="root"/>
</features>

Expand Down
4 changes: 2 additions & 2 deletions icode-ide/fr.cnes.icode.repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>fr.cnes.icode.repository</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>


Expand Down
2 changes: 1 addition & 1 deletion icode-ide/fr.cnes.icode.tp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>fr.cnes.icode.tp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/icode-library-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="icode.library.feature"
label="i-Code Library Feature"
version="4.0.0.qualifier"
version="4.1.0.qualifier"
provider-name="CNES">

<description url="http://www.example.com/description">
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/icode-library-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>icode.library.feature</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/icode-library-plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: i-Code Library Plugin
Bundle-SymbolicName: icode.library.plugin;singleton:=true
Bundle-Version: 4.0.0.qualifier
Bundle-Version: 4.1.0.qualifier
Bundle-ClassPath: target/lib/icode-library.jar
Bundle-Vendor: CNES
Export-Package: com.google.common.annotations,
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/icode-library-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>icode.library.plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion icode-ide/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>

<artifactId>icode-ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>i-Code CNES IDE</name>
Expand Down
37 changes: 36 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</distributionManagement>

<properties>
<icode.version>4.0.0</icode.version>
<icode.version>4.1.0</icode.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
Expand All @@ -91,6 +91,25 @@

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<inherited>false</inherited>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${maven.multiModuleProjectDirectory}/sonar-project.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surfire.version}</version>
Expand All @@ -106,6 +125,22 @@
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>merge</id>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
<directory>${project.basedir}</directory>
<includes>
<include>**/*.exec</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
Expand Down
26 changes: 12 additions & 14 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
sonar.projectKey=lequal_i-CodeCNES
sonar.projectName=i-Code CNES
sonar.projectDescription=CNES app analyzing Fortran 77, Fortran 90 and Shell files.
sonar.sources=.
sonar.tests=.
sonar.test.inclusions=**/src/test/**/*
sonar.exclusions=icode-ide/**/*
sonar.java.binaries=**/target/classes
sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco-aggregate/jacoco.xml

# Exclude SonarCFamily
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
sonar.projectKey=lequal_i-CodeCNES
sonar.projectName=i-Code CNES
sonar.projectDescription=CNES app analyzing Fortran 77, Fortran 90 and Shell files.
sonar.sources=src/main/java
sonar.tests=src/test/java
sonar.java.binaries=target
sonar.coverage.jacoco.xmlReportPaths=target/jacoco.exec

# Exclude SonarCFamily
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

0 comments on commit 377dab1

Please sign in to comment.