Skip to content

Commit 4a9d2cf

Browse files
zippy1978Gilles Grousset
andauthored
Renaming to Creedengo (#38)
* refact: renaming to Creedengo * fix: missing files in previous commit * fix(renaming): added deprecated annotation on renamed rules * fix(renaming): updated plugin inception year * fix(renaming): updated source file headers * feat(rules): upgraded creedengo-rules-specifications.version to 2.0.0 * doc: changelog update * refact: addressed sonar issues * refact: addressed sonar issues --------- Co-authored-by: Gilles Grousset <giles.grousset@insideapp.fr>
1 parent 4bd893f commit 4a9d2cf

File tree

131 files changed

+763
-1028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+763
-1028
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
60-
run: mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_ecoCode-ios
60+
run: mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-ios

.github/workflows/tag_release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
id: export_jar_files
4444
uses: actions/upload-artifact@v3
4545
with:
46-
name: ecocode-plugins
46+
name: creedengo-plugins
4747
path: lib
4848
- name: Export UPLOAD_URL
4949
id: export_upload_url
@@ -57,7 +57,7 @@ jobs:
5757
id: import_jar_files
5858
uses: actions/download-artifact@v3
5959
with:
60-
name: ecocode-plugins
60+
name: creedengo-plugins
6161
path: lib
6262
- name: Upload Release Asset - iOS Plugin
6363
id: upload-release-asset
@@ -66,6 +66,6 @@ jobs:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767
with:
6868
upload_url: ${{needs.build.outputs.upload_url}}
69-
asset_path: lib/ecocode-sonar-ios-plugin-${{ github.ref_name }}.jar
70-
asset_name: ecocode-ios-${{ github.ref_name }}.jar
71-
asset_content_type: application/zip
69+
asset_path: lib/creedengo-sonar-ios-plugin-${{ github.ref_name }}.jar
70+
asset_name: creedengo-ios-${{ github.ref_name }}.jar
71+
asset_content_type: application/zip

CHANGELOG.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,35 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
89
## [Unreleased]
910

1011
### Added
1112

12-
- [#207](https://github.com/green-code-initiative/ecoCode/issues/207) Add release tag analyzis on SonarCloud
13-
- [#23](https://github.com/green-code-initiative/ecoCode-ios/pull/23) Docker update (updated SonarQube and sonar-apple versions)
13+
### Changed
14+
15+
### Deleted
16+
17+
## [2.0.0]
18+
19+
### Added
20+
21+
- [#207](https://github.com/green-code-initiative/creedengo/issues/207) Add release tag analysis on SonarCloud
1422

1523
### Changed
1624

25+
- [#23](https://github.com/green-code-initiative/creedengo-ios/pull/23) Docker update (updated SonarQube and sonar-apple versions)
26+
- [#37](https://github.com/green-code-initiative/creedengo-ios/issues/37) Renaming to Creedengo
27+
1728
### Deleted
1829

1930
## [1.1.0]
2031

2132
### Changed
2233

23-
- Extracted iOS plugin from https://github.com/green-code-initiative/ecoCode-mobile to new repository (https://github.com/green-code-initiative/ecoCode-ios)
24-
- [#11](https://github.com/green-code-initiative/ecoCode-ios/pull/11) License and source headers update (LGPL v3 to GPL v3)
34+
- Extracted iOS plugin from https://github.com/green-code-initiative/creedengo-mobile to new repository (https://github.com/green-code-initiative/creedengo-ios)
35+
- [#11](https://github.com/green-code-initiative/creedengo-ios/pull/11) License and source headers update (LGPL v3 to GPL v3)
2536

26-
[unreleased]: https://github.com/green-code-initiative/ecoCode-ios/compare/v1.0.1...HEAD
37+
[unreleased]: https://github.com/green-code-initiative/creedengo-ios/compare/v1.0.1...HEAD
2738

28-
[1.0.1]: https://github.com/green-code-initiative/ecoCode/releases/tag/v1.0.1
39+
[1.0.1]: https://github.com/green-code-initiative/creedengo/releases/tag/v1.0.1

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The iOS plugin is split into 3 different modules:
1616

1717
Swift file parser is build using the [ANTLR](https://www.antlr.org/) parser generator.
1818

19-
The generated parser source files are located into `swift-lang/src/main/java/io/ecocode/ios/swift/antlr/generated`. Those source files should not be edited manually.
19+
The generated parser source files are located into `swift-lang/src/main/java/org/greencodeinitiative/creedengo/ios/swift/antlr/generated`. Those source files should not be edited manually.
2020

2121
When necessary (in case of Swift language syntax upgrade for example), those source files should be re-generated with ANTLR.
2222

@@ -30,14 +30,14 @@ When adding a new rule, the following steps are required:
3030

3131
### Declaring the rule
3232

33-
The new rule must be declared in `swift-lang/src/resources/ecocode_swift_profile.json`
33+
The new rule must be declared in `swift-lang/src/resources/creedengo_swift_profile.json`
3434

35-
> Note: in case the new rule is not available in https://github.com/green-code-initiative/ecoCode/tree/main/ecocode-rules-specifications yet create a matching <RULE_ID>.json ans <RULE_ID>.html in `swift-lang/src/resources/io/ecocode/rules/swift/` to provide rule metadata.
35+
> Note: in case the new rule is not available in https://github.com/green-code-initiative/creedengo/tree/main/creedengo-rules-specifications yet create a matching <RULE_ID>.json ans <RULE_ID>.html in `swift-lang/src/resources/io/creedengo/rules/swift/` to provide rule metadata.
3636
3737
### Implementing a check
3838

39-
In order to implement a check for the rule, create a Check class inherited from `SwiftRuleCheck` in `src/main/java/io/ecocode/ios/swift/checks`.
39+
In order to implement a check for the rule, create a Check class inherited from `SwiftRuleCheck` in `src/main/java/org/greencodeinitiative/creedengo/ios/swift/checks`.
4040

41-
Have a look at `swift-lang/src/main/java/io/ecocode/ios/swift/checks/idleness/IdleTimerDisabledCheck` to learn more about the implementation.
41+
Have a look at `swift-lang/src/main/java/org/greencodeinitiative/creedengo/ios/swift/checks/idleness/IdleTimerDisabledCheck` to learn more about the implementation.
4242

4343
Don't forget to add the `@org.sonar.check.Rule` annotation to the check in order to register it to the AST visitor.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM sonarqube:10.5.0-community
22
USER root
3-
ADD https://github.com/insideapp-oss/sonar-apple/releases/download/0.4.1/sonar-apple-plugin-0.4.1.jar /opt/sonarqube/extensions/plugins/sonar-apple-plugin-0.4.1.jar
4-
RUN chmod 777 /opt/sonarqube/extensions/plugins/sonar-apple-plugin-0.4.1.jar
3+
ADD https://github.com/insideapp-oss/sonar-apple/releases/download/0.5.0/sonar-apple-plugin-0.5.0.jar /opt/sonarqube/extensions/plugins/sonar-apple-plugin-0.5.0.jar
4+
RUN chmod 777 /opt/sonarqube/extensions/plugins/sonar-apple-plugin-0.5.0.jar
55
USER sonarqube

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
![Logo](docs/resources/5ekko.png)
22
======================================
33

4-
Mobile apps running on top of battery-limited devices are more than others concerned by the reduction of their environmental footprint. Hence, we created `ecoCode iOS`, the version of ecoCode project fully dedicated to the iOS platform. It provides static code analyzers to highlight code structures that may have a negative ecological impact: energy over-consumption, "fatware", shortening devices' lifespan, etc.
4+
Mobile apps running on top of battery-limited devices are more than others concerned by the reduction of their environmental footprint. Hence, we created `Creedengo iOS`, the version of Creedengo project fully dedicated to the iOS platform. It provides static code analyzers to highlight code structures that may have a negative ecological impact: energy over-consumption, "fatware", shortening devices' lifespan, etc.
55

6-
ecoCode iOS is based on evolving catalogs of [best practices for iOS](https://github.com/cnumr/best-practices-mobile?#-ios-platform). A SonarQube plugin then implements these catalogs as rules for scanning your projects.
6+
Creedengo iOS is based on evolving catalogs of [best practices for iOS](https://github.com/cnumr/best-practices-mobile?#-ios-platform). A SonarQube plugin then implements these catalogs as rules for scanning your projects.
77

8-
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![Build](https://github.com/green-code-initiative/ecoCode-ios/actions/workflows/build.yml/badge.svg)
8+
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![Build](https://github.com/green-code-initiative/creedengo-ios/actions/workflows/build.yml/badge.svg)
99

10-
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_ecoCode-ios&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_ecoCode-ios) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_ecoCode-ios&metric=coverage)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_ecoCode-ios) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_ecoCode-ios&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_ecoCode-ios) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_ecoCode-ios&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_ecoCode-ios) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_ecoCode-ios&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_ecoCode-ios)
10+
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_creedengo-ios&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_creedengo-ios) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_creedengo-ios&metric=coverage)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_creedengo-ios) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_creedengo-ios&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_creedengo-ios) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_creedengo-ios&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_creedengo-ios) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=green-code-initiative_creedengo-ios&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=green-code-initiative_creedengo-ios)
1111

1212
🌿 SonarQube Plugin
1313
-------------------
1414

15-
ecoCode iOS SonarQube plugin is an "eco-responsibility" static code analyzer for iOS projects written in Swift. Its aim is to detect code smells indicating how the source code can be improved to reduce their environmental and social impact.
15+
Creedengo iOS SonarQube plugin is an "eco-responsibility" static code analyzer for iOS projects written in Swift. Its aim is to detect code smells indicating how the source code can be improved to reduce their environmental and social impact.
1616

1717
🛒 Distribution
1818
---------------
1919

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

22-
> NB: To work, `ecocode-ios` needs `Swift` language support in SonarQube. For *SonarQube Community Edition* (which does not support Swift language), you need to install an additional plugin like [sonar-apple](https://github.com/insideapp-oss/sonar-apple).
22+
> NB: To work, `creedengo-ios` needs `Swift` language support in SonarQube. For *SonarQube Community Edition* (which does not support Swift language), you need to install an additional plugin like [sonar-apple](https://github.com/insideapp-oss/sonar-apple).
2323
24-
By default ecoCode profile is not activated. To activate ecoCode rules in SonarQube, create a new profile (or extend an existing one) where ecoCode rules are activated. Here is an example:
24+
By default Creedengo profile is not activated. To activate Creedengo rules in SonarQube, create a new profile (or extend an existing one) where Creedengo rules are activated. Here is an example:
2525

2626
![Profiles](docs/resources/profiles.png)
2727

@@ -62,7 +62,7 @@ The tests instance of SonarQube with the plugin will then be available at: [http
6262

6363
### Test
6464

65-
An iOS test project is available [here](https://github.com/green-code-initiative/ecoCode-mobile-ios-swift-test-project)/
65+
An iOS test project is available [here](https://github.com/green-code-initiative/creedengo-mobile-ios-swift-test-project)/
6666

6767
🤝 Partners
6868
------------
@@ -85,4 +85,4 @@ An iOS test project is available [here](https://github.com/green-code-initiative
8585

8686
If you want to contribute to the project, your help will be greatly appreciated.
8787

88-
Start right away by reading [General contribution guide](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/CONTRIBUTING.md) and the [iOS specific contribution guide](https://github.com/green-code-initiative/ecoCode-ios/blob/main/CONTRIBUTING.md).
88+
Start right away by reading [General contribution guide](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/CONTRIBUTING.md) and the [iOS specific contribution guide](https://github.com/green-code-initiative/creedengo-ios/blob/main/CONTRIBUTING.md).

commons-ios/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<modelVersion>4.0.0</modelVersion>
33

44
<parent>
5-
<groupId>io.ecocode</groupId>
6-
<artifactId>ios-plugin</artifactId>
7-
<version>1.1.1-SNAPSHOT</version>
5+
<groupId>org.green-code-initiative</groupId>
6+
<artifactId>creedengo-ios-plugin</artifactId>
7+
<version>2.0.0-SNAPSHOT</version>
88
</parent>
99

10-
<artifactId>ecocode-commons-ios</artifactId>
10+
<artifactId>creedengo-commons-ios</artifactId>
1111

1212
<dependencies>
1313

commons-ios/src/main/java/io/ecocode/ios/Const.java renamed to commons-ios/src/main/java/org/greencodeinitiative/creedengo/ios/Const.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* ecoCode iOS plugin - Help the earth, adopt this green plugin for your applications
3-
* Copyright © 2023 green-code-initiative (https://www.ecocode.io/)
2+
* Creedengo iOS plugin - Help the earth, adopt this green plugin for your applications
3+
* Copyright © 2024 green-code-initiative (https://green-code-initiative.org/)
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -15,11 +15,11 @@
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
package io.ecocode.ios;
18+
package org.greencodeinitiative.creedengo.ios;
1919

2020
public final class Const {
21-
public static final String SWIFT_REPOSITORY_KEY = "ecoCode-swift";
22-
public static final String PBXPROJ_REPOSITORY_KEY = "ecoCode-pbxproj";
21+
public static final String SWIFT_REPOSITORY_KEY = "creedengo-swift";
22+
public static final String PBXPROJ_REPOSITORY_KEY = "creedengo-pbxproj";
2323

2424
private Const() {
2525

commons-ios/src/main/java/io/ecocode/ios/antlr/AntlrContext.java renamed to commons-ios/src/main/java/org/greencodeinitiative/creedengo/ios/antlr/AntlrContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* ecoCode iOS plugin - Help the earth, adopt this green plugin for your applications
3-
* Copyright © 2023 green-code-initiative (https://www.ecocode.io/)
2+
* Creedengo iOS plugin - Help the earth, adopt this green plugin for your applications
3+
* Copyright © 2024 green-code-initiative (https://green-code-initiative.org/)
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
package io.ecocode.ios.antlr;
18+
package org.greencodeinitiative.creedengo.ios.antlr;
1919

2020
import org.antlr.v4.runtime.CommonTokenStream;
2121
import org.antlr.v4.runtime.Token;

commons-ios/src/main/java/io/ecocode/ios/antlr/CustomTreeVisitor.java renamed to commons-ios/src/main/java/org/greencodeinitiative/creedengo/ios/antlr/CustomTreeVisitor.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* ecoCode iOS plugin - Help the earth, adopt this green plugin for your applications
3-
* Copyright © 2023 green-code-initiative (https://www.ecocode.io/)
2+
* Creedengo iOS plugin - Help the earth, adopt this green plugin for your applications
3+
* Copyright © 2024 green-code-initiative (https://green-code-initiative.org/)
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
19-
package io.ecocode.ios.antlr;
18+
package org.greencodeinitiative.creedengo.ios.antlr;
2019

2120
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
2221
import org.antlr.v4.runtime.tree.ParseTree;

0 commit comments

Comments
 (0)