Skip to content

Commit

Permalink
Merge pull request #43 from Lmgrto/lmangaretto-renommage
Browse files Browse the repository at this point in the history
Lmangaretto renommage
  • Loading branch information
dedece35 authored Nov 19, 2024
2 parents b50615c + 02baec2 commit 1d9fb32
Show file tree
Hide file tree
Showing 38 changed files with 123 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_ecoCode-python
run: mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-python
4 changes: 2 additions & 2 deletions .github/workflows/build_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:
# - main

env:
IMAGE_NAME: sonarqube-ecocode-python
IMAGE_NAME: sonarqube-creedengo-python
IMAGES: |
ghcr.io/${{ github.repository_owner }}/sonarqube-ecocode-python
ghcr.io/${{ github.repository_owner }}/sonarqube-creedengo-python
jobs:
Build:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
id: export_jar_files
uses: actions/upload-artifact@v3
with:
name: ecocode-plugins
name: creedengo-plugins
path: lib
- name: Export LAST_TAG
id: export_last_tag
Expand All @@ -80,7 +80,7 @@ jobs:
id: import_jar_files
uses: actions/download-artifact@v3
with:
name: ecocode-plugins
name: creedengo-plugins
path: lib
- name: Upload Release Asset - Python Plugin
id: upload-release-asset
Expand All @@ -89,6 +89,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{needs.build.outputs.upload_url}}
asset_path: lib/ecocode-python-plugin-${{ needs.build.outputs.last_tag }}.jar
asset_name: ecocode-python-plugin-${{ needs.build.outputs.last_tag }}.jar
asset_path: lib/creedengo-python-plugin-${{ needs.build.outputs.last_tag }}.jar
asset_name: creedengo-python-plugin-${{ needs.build.outputs.last_tag }}.jar
asset_content_type: application/zip
8 changes: 4 additions & 4 deletions .github/workflows/tag_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
id: export_jar_files
uses: actions/upload-artifact@v3
with:
name: ecocode-plugins
name: creedengo-plugins
path: target
- name: Export UPLOAD_URL
id: export_upload_url
Expand All @@ -60,7 +60,7 @@ jobs:
id: import_jar_files
uses: actions/download-artifact@v3
with:
name: ecocode-plugins
name: creedengo-plugins
path: target
- name: Upload Release Asset - Python Plugin
id: upload-release-asset
Expand All @@ -69,6 +69,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{needs.build.outputs.upload_url}}
asset_path: target/ecocode-python-plugin-${{ github.ref_name }}.jar
asset_name: ecocode-python-plugin-${{ github.ref_name }}.jar
asset_path: target/creedengo-python-plugin-${{ github.ref_name }}.jar
asset_name: creedengo-python-plugin-${{ github.ref_name }}.jar
asset_content_type: application/zip
48 changes: 24 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- refactoring docker system
- [#29](https://github.com/green-code-initiative/ecoCode-python/issues/29) Add test to ensure all Rules are registered
- [#24](https://github.com/green-code-initiative/ecoCode-python/issues/24) Set correct required language because the
- [#29](https://github.com/green-code-initiative/creedengo-python/issues/29) Add test to ensure all Rules are registered
- [#24](https://github.com/green-code-initiative/creedengo-python/issues/24) Set correct required language because the
plugin wasn't loaded anymore - retro-compatibility modifications (9.9.0 to 10.7 and not compatible before 9.9.0) AND
add support for > 10.5 Sonarqube version (up to 10.7.0)
- update some maven plugin versions and library versions to be up-to-date
Expand All @@ -33,36 +33,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- [#26](https://github.com/green-code-initiative/ecoCode-python/issues/26) [EC89] Avoid unlimited cache
- [#26](https://github.com/green-code-initiative/creedengo-python/issues/26) [EC89] Avoid unlimited cache

### Changed

- [#22](https://github.com/green-code-initiative/ecoCode-python/issues/22) Depreciation of EC69 rule for python because
- [#22](https://github.com/green-code-initiative/creedengo-python/issues/22) Depreciation of EC69 rule for python because
not relevant (after analysis)

### Deleted

- [#22](https://github.com/green-code-initiative/ecoCode-python/issues/22) Delete deprecated EC66 rule for Python
- [#22](https://github.com/green-code-initiative/creedengo-python/issues/22) Delete deprecated EC66 rule for Python

## [1.4.3] - 2024-05-15

### Added

- [#18](https://github.com/green-code-initiative/ecoCode-python/issues/18) Add support for SonarQube 10.4 "
- [#18](https://github.com/green-code-initiative/creedengo-python/issues/18) Add support for SonarQube 10.4 "
DownloadOnlyWhenRequired" feature
- Add Support for SonarQube 10.4.1

### Changed

- [#17](https://github.com/green-code-initiative/ecoCode-python/issues/17) EC7 - correction setter problem on
- [#17](https://github.com/green-code-initiative/creedengo-python/issues/17) EC7 - correction setter problem on
constructor method
- check Sonarqube 10.4.1 compatibility + update docker files and README.md / NOT OK with 10.5.x (issue created)

## [1.4.2] - 2024-01-11

### Changed

- [#14](https://github.com/green-code-initiative/ecoCode-python/issues/14) Correction of error with deprecated EC34 rule
- [#14](https://github.com/green-code-initiative/creedengo-python/issues/14) Correction of error with deprecated EC34 rule
- Update ecocode-rules-specifications to 1.4.7

## [1.4.1] - 2024-01-05
Expand All @@ -73,36 +73,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- [#5](https://github.com/green-code-initiative/ecoCode-python/pull/5) Upgrade licence system and licence headers of
- [#5](https://github.com/green-code-initiative/creedengo-python/pull/5) Upgrade licence system and licence headers of
Java files
- [#6](https://github.com/green-code-initiative/ecoCode-python/pull/6) Adding EC35 rule : EC35 rule replaces EC34 with a
- [#6](https://github.com/green-code-initiative/creedengo-python/pull/6) Adding EC35 rule : EC35 rule replaces EC34 with a
specific use case ("file not found" specific)
- [#7](https://github.com/green-code-initiative/ecoCode-python/issues/7) Add build number to manifest
- [#123](https://github.com/green-code-initiative/ecoCode/issues/123) Improve unit tests for EC7 rule
- [#7](https://github.com/green-code-initiative/creedengo-python/issues/7) Add build number to manifest
- [#123](https://github.com/green-code-initiative/creedengo/issues/123) Improve unit tests for EC7 rule
- Update ecocode-rules-specifications to 1.4.6
- README.md upgrade : docker test environment
- [#10](https://github.com/green-code-initiative/ecoCode-python/issues/10) Correction of NullPointException in EC2 rule
- [#10](https://github.com/green-code-initiative/creedengo-python/issues/10) Correction of NullPointException in EC2 rule

### Deleted

- [#4](https://github.com/green-code-initiative/ecoCode-python/issues/4) Deprecate rule EC66 for Python because not
- [#4](https://github.com/green-code-initiative/creedengo-python/issues/4) Deprecate rule EC66 for Python because not
applicable (see details inside issue)

## [1.4.0] - 2023-08-08

### Added

- Python rules moved from `ecoCode` repository to current repository
- [#142](https://github.com/green-code-initiative/ecoCode/issues/142) new Python rule : Multiple if-else statement +
- Python rules moved from `ecocode` repository to current repository
- [#142](https://github.com/green-code-initiative/creedengo/issues/142) new Python rule : Multiple if-else statement +
refactoring implementation
- [#205](https://github.com/green-code-initiative/ecoCode/issues/205) compatibility with SonarQube 10.1
- [#205](https://github.com/green-code-initiative/creedengo/issues/205) compatibility with SonarQube 10.1

## Comparison list

[unreleased](https://github.com/green-code-initiative/ecoCode-python/compare/1.5.0...HEAD)
[1.5.0](https://github.com/green-code-initiative/ecoCode-python/compare/1.4.4...1.5.0)
[1.4.4](https://github.com/green-code-initiative/ecoCode-python/compare/1.4.3...1.4.4)
[1.4.3](https://github.com/green-code-initiative/ecoCode-python/compare/1.4.2...1.4.3)
[1.4.2](https://github.com/green-code-initiative/ecoCode-python/compare/1.4.1...1.4.2)
[1.4.1](https://github.com/green-code-initiative/ecoCode-python/compare/1.4.0...1.4.1)
[1.4.0](https://github.com/green-code-initiative/ecoCode-python/releases/tag/1.4.0)
[unreleased](https://github.com/green-code-initiative/creedengo-python/compare/1.5.0...HEAD)
[1.5.0](https://github.com/green-code-initiative/creedengo-python/compare/1.4.4...1.5.0)
[1.4.4](https://github.com/green-code-initiative/creedengo-python/compare/1.4.3...1.4.4)
[1.4.3](https://github.com/green-code-initiative/creedengo-python/compare/1.4.2...1.4.3)
[1.4.2](https://github.com/green-code-initiative/creedengo-python/compare/1.4.1...1.4.2)
[1.4.1](https://github.com/green-code-initiative/creedengo-python/compare/1.4.0...1.4.1)
[1.4.0](https://github.com/green-code-initiative/creedengo-python/releases/tag/1.4.0)
2 changes: 1 addition & 1 deletion CODE_STYLE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please read common [CODE_STYLE.md](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/CODE_STYLE.md) in `ecoCode-common` repository.
Please read common [CODE_STYLE.md](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/CODE_STYLE.md) in `creedengo-common` repository.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please read common [CONTRIBUTING.md](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/CONTRIBUTING.md) in `ecoCode-common` repository.
Please read common [CONTRIBUTING.md](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/CONTRIBUTING.md) in `creedengo-common` repository.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ ARG SONARQUBE_VERSION=10.7.0-community

FROM maven:${MAVEN_BUILDER} AS builder

COPY . /usr/src/ecocode
COPY . /usr/src/creedengo

WORKDIR /usr/src/ecocode
WORKDIR /usr/src/creedengo
COPY src src/
COPY pom.xml tool_build.sh ./

RUN ./tool_build.sh

FROM sonarqube:${SONARQUBE_VERSION}
COPY --from=builder /usr/src/ecocode/target/ecocode-*.jar /opt/sonarqube/extensions/plugins/
COPY --from=builder /usr/src/creedengo/target/creedengo-*.jar /opt/sonarqube/extensions/plugins/
USER sonarqube
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Common installation notes / requirements
========================================

Please read common [INSTALL.md](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/INSTALL.md)
in `ecoCode-common` repository. Please follow the specific guides below for additional information on installing the
Please read common [INSTALL.md](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/INSTALL.md)
in `creedengo-common` repository. Please follow the specific guides below for additional information on installing the
desired plugins.

Special points for Standard plugins
Expand All @@ -14,7 +14,7 @@ Project structure
Here is a preview of project tree :

```txt
ecoCode-python # Root directory
creedengo-python # Root directory
|
+--src # source directory
|
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
EcoCode-python
creedengo-python
===========

_ecoCode_ is a collective project aiming to reduce environmental footprint of software at the code level. The goal of
_creedengo_ is a collective project aiming to reduce environmental footprint of software at the code level. The goal of
the project is to provide a list of static code analyzers to highlight code structures that may have a negative
ecological impact: energy and resources over-consumption, "fatware", shortening terminals' lifespan, etc.

Expand All @@ -14,14 +14,14 @@ SonarQube plugin then implements these catalogs as rules for scanning your Pytho
> refer to the contribution section.
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/CODE_OF_CONDUCT.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/CODE_OF_CONDUCT.md)

🌿 SonarQube Plugins
-------------------

This plugin is part of the ecoCode project.\
This plugin is part of the creedengo project.\
You can find a list of all our other plugins in
the [ecoCode repository](https://github.com/green-code-initiative/ecoCode#-sonarqube-plugins)
the [creedengo repository](https://github.com/green-code-initiative/creedengo#-sonarqube-plugins)

🚀 Getting Started
------------------
Expand All @@ -31,34 +31,34 @@ You can give a try with a one command docker :
```sh
docker run -ti --rm \
-p 9000:9000 \
--name sonarqube-ecocode-python ghcr.io/green-code-initiative/sonarqube-ecocode-python:latest
--name sonarqube-creedengo-python ghcr.io/green-code-initiative/sonarqube-creedengo-python:latest
```

or (with logs and data locally stored) :

```sh
docker run -ti --rm \
-v sq_ecocode_logs:/opt/sonarqube/logs \
-v sq_ecocode_data:/opt/sonarqube/data \
-v sq_creedengo_logs:/opt/sonarqube/logs \
-v sq_creedengo_data:/opt/sonarqube/data \
-p 9000:9000 \
--name sonarqube-ecocode-python ghcr.io/green-code-initiative/sonarqube-ecocode-python:latest
--name sonarqube-creedengo-python ghcr.io/green-code-initiative/sonarqube-creedengo-python:latest
```

... and configure local SonarQube (security config and quality profile : see [configuration](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/INSTALL.md#configuration-sonarqube) for more details).
... and configure local SonarQube (security config and quality profile : see [configuration](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/INSTALL.md#configuration-sonarqube) for more details).

To install other `ecocode` plugins, you can also :
To install other `creedengo` plugins, you can also :

- download each plugin separatly and copy the plugin (jar file) to `$SONAR_INSTALL_DIR/extensions/plugins` and restart SonarQube.
- install different ecocode plugins with Marketplace (inside admin panel of SonarQube)
- install different creedengo plugins with Marketplace (inside admin panel of SonarQube)

Then you can use Python test project repository to test the environment : see README.md of [Python test project](https://github.com/green-code-initiative/ecoCode-python-test-project)
Then you can use Python test project repository to test the environment : see README.md of [Python test project](https://github.com/green-code-initiative/creedengo-python-test-project)

Finally, you can directly use a [all-in-one docker-compose](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/INSTALL.md#start-sonarqube-if-first-time)
Finally, you can directly use a [all-in-one docker-compose](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/INSTALL.md#start-sonarqube-if-first-time)

🛒 Distribution
------------------

Ready to use binaries are available [from GitHub](https://github.com/green-code-initiative/ecoCode-python/releases).
Ready to use binaries are available [from GitHub](https://github.com/green-code-initiative/creedengo-python/releases).

🧩 Compatibility
------------------
Expand Down
2 changes: 1 addition & 1 deletion TODOs_DDC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TODOS dev DDC

actions vues en séance weekly-meeting :

- ecoCode-android : nettoyer packages (suite au release)
- creedengo-android : nettoyer packages (suite au release)
- teams : nettoyer anciennes équipes

actions vues perso :
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: sonarqube_ecocode_python
name: sonarqube_creedengo_python

services:
sonar:
build: .
container_name: sonar_ecocode_python
container_name: sonar_creedengo_python
ports:
- ":9000"
networks:
Expand All @@ -28,7 +28,7 @@ services:

db:
image: postgres:12
container_name: postgresql_ecocode_python
container_name: postgresql_creedengo_python
networks:
- sonarnet
volumes:
Expand Down
20 changes: 10 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<modelVersion>4.0.0</modelVersion>

<groupId>io.ecocode</groupId>
<artifactId>ecocode-python-plugin</artifactId>
<artifactId>creedengo-python-plugin</artifactId>
<version>1.5.1-SNAPSHOT</version>
<packaging>sonar-plugin</packaging>

<name>ecoCode - Python language</name>
<name>creedengo - Python language</name>
<description>Provides rules to reduce the environmental footprint of your Python programs</description>
<inceptionYear>2023</inceptionYear>
<url>https://github.com/green-code-initiative/ecoCode-python</url>
<url>https://github.com/green-code-initiative/creedengo-python</url>

<organization>
<name>green-code-initiative</name>
Expand All @@ -24,14 +24,14 @@
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/green-code-initiative/ecocode-python</connection>
<developerConnection>scm:git:https://github.com/green-code-initiative/ecocode-python</developerConnection>
<url>https://github.com/green-code-initiative/ecocode-python</url>
<connection>scm:git:https://github.com/green-code-initiative/creedengo-python</connection>
<developerConnection>scm:git:https://github.com/green-code-initiative/creedengo-python</developerConnection>
<url>https://github.com/green-code-initiative/creedengo-python</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/green-code-initiative/ecoCode-python/issues</url>
<url>https://github.com/green-code-initiative/creedengo-python/issues</url>
</issueManagement>

<properties>
Expand Down Expand Up @@ -60,7 +60,7 @@

<mockito.version>5.14.1</mockito.version>

<!-- temporary version waiting for real automatic release in ecocode repository -->
<!-- temporary version waiting for real automatic release in creedengo repository -->
<ecocode-rules-specifications.version>1.6.4</ecocode-rules-specifications.version>

</properties>
Expand Down Expand Up @@ -172,7 +172,7 @@
<version>1.23.0.740</version>
<extensions>true</extensions>
<configuration>
<pluginKey>ecocodepython</pluginKey>
<pluginKey>creedengopython</pluginKey>
<pluginClass>fr.greencodeinitiative.python.PythonPlugin</pluginClass>
<sonarLintSupported>true</sonarLintSupported>
<pluginApiMinVersion>${sonarqube.version}</pluginApiMinVersion>
Expand Down Expand Up @@ -256,7 +256,7 @@
<configuration>
<properties>
<owner>Green Code Initiative</owner>
<email>https://www.ecocode.io</email>
<email>https://green-code-initiative.org</email>
</properties>
<licenseSets>
<licenseSet>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/fr/greencodeinitiative/python/PythonPlugin.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
* creedengo - Python language - Provides rules to reduce the environmental footprint of your Python programs
* Copyright © 2023 Green Code Initiative (https://green-code-initiative.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Loading

0 comments on commit 1d9fb32

Please sign in to comment.