Skip to content

Commit fdabb83

Browse files
committed
Move to Creedengo
1 parent 8809ea6 commit fdabb83

File tree

85 files changed

+265
-274
lines changed

Some content is hidden

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

85 files changed

+265
-274
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🐞 Bug Report
2-
description: This form is to report unexpected behavior in ecoCode-javascript.
3-
labels: [ "💉 bug: unconfirmed" ]
2+
description: This form is to report unexpected behavior in creedengo-javascript.
3+
labels: ["💉 bug: unconfirmed"]
44
body:
55
- type: markdown
66
attributes:
@@ -40,8 +40,8 @@ body:
4040
- type: input
4141
id: plugin-version
4242
attributes:
43-
label: ecoCode-javascript Version
44-
description: Please provide the version of ecoCode-javascript that you are using.
43+
label: creedengo-javascript Version
44+
description: Please provide the version of creedengo-javascript that you are using.
4545
validations:
4646
required: true
4747
- type: input

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Start a Discussion
4-
about: "Start a discussion to share your experience with ecoCode-javascript"
5-
url: https://github.com/green-code-initiative/ecoCode-javascript/discussions/new/choose
4+
about: "Start a discussion to share your experience with creedengo-javascript"
5+
url: https://github.com/green-code-initiative/creedengo-javascript/discussions/new/choose

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ✨ Feature Request
2-
description: This form is to request a new feature in ecoCode-javascript.
3-
labels: [ "🚀 enhancement" ]
2+
description: This form is to request a new feature in creedengo-javascript.
3+
labels: ["🚀 enhancement"]
44
body:
55
- type: textarea
66
id: solution

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish
33
on:
44
push:
55
tags:
6-
- '[0-9]+.[0-9]+.[0-9]+'
6+
- "[0-9]+.[0-9]+.[0-9]+"
77

88
permissions:
99
packages: write
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-node@v4
2727
with:
2828
node-version: ${{ env.NODE_VERSION }}
29-
registry-url: 'https://registry.npmjs.org'
29+
registry-url: "https://registry.npmjs.org"
3030

3131
- name: Install dependencies
3232
run: yarn install --immutable
@@ -62,7 +62,7 @@ jobs:
6262
run: cp LICENSE.md eslint-plugin/
6363

6464
- name: Add scope to package name
65-
run: npx --yes change-package-name @${{ github.repository_owner }}/ecocode-eslint-plugin
65+
run: npx --yes change-package-name @${{ github.repository_owner }}/creedengo-eslint-plugin
6666
working-directory: eslint-plugin
6767

6868
- name: Configure GitHub Packages registry

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
strategy:
7-
description: 'Strategy of semantic version to apply'
7+
description: "Strategy of semantic version to apply"
88
required: true
99
type: choice
1010
options:
@@ -37,7 +37,7 @@ jobs:
3737
node-version: ${{ env.NODE_VERSION }}
3838

3939
- name: Use JDK ${{ env.JDK_VERSION }}
40-
uses: actions/setup-java@v3
40+
uses: actions/setup-java@v4
4141
with:
4242
distribution: temurin
4343
java-version: ${{ env.JDK_VERSION }}
@@ -94,7 +94,7 @@ jobs:
9494
tag_name: ${{ steps.package-version.outputs.version }}
9595
body: ${{ steps.extract-release-notes.outputs.release_notes }}
9696
token: ${{ secrets.RELEASE_TOKEN }}
97-
files: sonar-plugin/target/ecocode-javascript-plugin-${{ steps.package-version.outputs.version }}.jar
97+
files: sonar-plugin/target/creedengo-javascript-plugin-${{ steps.package-version.outputs.version }}.jar
9898

9999
prepare-next-release:
100100
name: Prepare next release
@@ -108,7 +108,7 @@ jobs:
108108
token: ${{ secrets.RELEASE_TOKEN }}
109109

110110
- name: Use JDK ${{ env.JDK_VERSION }}
111-
uses: actions/setup-java@v3
111+
uses: actions/setup-java@v4
112112
with:
113113
distribution: temurin
114114
java-version: ${{ env.JDK_VERSION }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- [#39](https://github.com/green-code-initiative/ecoCode-javascript/issues/39) Add rule `@ecocode/avoid-brightness-override` (EC522)
1313
- [#41](https://github.com/green-code-initiative/ecoCode-javascript/pull/41) Add rule `@ecocode/no-torch` (EC530)
14+
- Rename plugin to creedengo-javascript
1415
- Add support for SonarQube up to 10.7
1516

1617
### Changed

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## Hello! We are pleased to see you here 👋
22

33
Please read
4-
common [CONTRIBUTING.md](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/CONTRIBUTING.md)
5-
in `ecoCode-common` repository first.\
6-
Also check the [starter pack](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/starter-pack.md) to
4+
common [CONTRIBUTING.md](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/CONTRIBUTING.md)
5+
in `creedengo-common` repository first.\
6+
Also check the [starter pack](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/starter-pack.md) to
77
have the basic information before starting.
88

99
## Structure
@@ -49,7 +49,7 @@ But it can be useful to prepare a test project to check the correct execution of
4949

5050
### Before starting
5151

52-
Before even starting to implement the rule, it must have been discussed, mesured and documented in the ecoCode
52+
Before even starting to implement the rule, it must have been discussed, mesured and documented in the Creedengo
5353
referential. Please follow
5454
the [dedicated documentation](https://github.com/green-code-initiative/ecoCode/blob/main/ecocode-rules-specifications/README.md)
5555
to find out how to proceed.
@@ -74,11 +74,11 @@ The project itself uses ESLint to helps linting rule algorithms.
7474

7575
### In the SonarQube plugin
7676

77-
Now that the rule has been implemented in the ecoCode referential and its implementation written in the ESLint plugin,
77+
Now that the rule has been implemented in the Creedengo referential and its implementation written in the ESLint plugin,
7878
all that remains is to reference it in the SonarQube plugin. Here are the simple steps:
7979

80-
1. Create a Java class in `src/main/java/io/ecocode/javascript/checks/` with the declaration of the SonarQube key and
81-
the ESLint key (check other classes to have an example)
80+
1. Create a Java class in `src/main/java/fr/greencodeinitiative/creedengo/javascript/checks/` with
81+
the declaration of the SonarQube key and the ESLint key (check other classes to have an example)
8282
2. Reference created in method `getAllChecks()` of Java class `CheckList` (please use alphabetical order)
8383
3. Add the SonarQube key of the rule in the appropriate profile Json file.
8484

README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@
33
Websites are becoming increasingly heavy and complex over the years. They represent an important part
44
of the digital environmental footprint. The objective of this project is to detect smells in a website source code
55
that can have a negative ecological impact: overconsumption of energy, "fatware", shortening of the life span of
6-
devices, etc. This project is part of [ecoCode](https://github.com/green-code-initiative/ecoCode).
6+
devices, etc. This project is part of [Creedengo](https://github.com/green-code-initiative/ecoCode) (previously ecoCode).
77

88
Rules in this repository are mainly based from book
99
[115 Web Ecodesign Best Practices](https://github.com/cnumr/best-practices).
1010
This reference is maintained by [CNumR](https://collectif.greenit.fr/), a french collective that works
1111
for a responsible design of digital services. You can find all applicable rules in the [RULES.md file](RULES.md).
1212

1313
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
14-
![Build](https://github.com/green-code-initiative/ecoCode-javascript/actions/workflows/build.yml/badge.svg)
14+
[![CI](https://github.com/green-code-initiative/creedengo-javascript/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/green-code-initiative/creedengo-javascript/actions/workflows/ci.yml)
1515
[![Sonar Quality gate](https://img.shields.io/sonar/quality_gate/green-code-initiative_ecoCode-linter?server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=green-code-initiative_ecoCode-linter)
1616

17-
🌿 SonarQube plugin
18-
---------------------------------
17+
## 🌿 SonarQube plugin
1918

20-
_ecoCode_ JavaScript is an "eco-responsibility" static code analyzer for projects based on the JavaScript ecosystem. It
19+
_Creedengo_ JavaScript is an "eco-responsibility" static code analyzer for projects based on the JavaScript ecosystem. It
2120
can handle JavaScript, TypeScript and all frameworks that use them. Its main purpose is to work with website source
2221
code, but it can also analyze back-end code.
2322

@@ -29,46 +28,42 @@ This project proposes rules for the following technologies:
2928
- React (JSX)
3029
- React Native / Expo
3130

32-
🔧 ESLint plugin
33-
----------------
31+
## 🔧 ESLint plugin
3432

3533
This project uses an internal ESLint plugin to analyze your source code.
3634

3735
If you are not using SonarQube, we have a solution for you: the linter is working nicely on its own! \
3836
Follow instructions in the [dedicated README file](eslint-plugin/README.md) to use it as a standalone plugin.
3937

40-
🛒 Distribution
41-
---------------
38+
## 🛒 Distribution
4239

43-
[![sonar-plugin version](https://img.shields.io/github/v/release/green-code-initiative/ecoCode-javascript?label=SonarQube%20plugin)](https://github.com/green-code-initiative/ecoCode-javascript/releases/latest)
44-
[![eslint-plugin version](https://img.shields.io/npm/v/@ecocode/eslint-plugin?label=ESLint%20plugin)](https://npmjs.com/package/@ecocode/eslint-plugin)
40+
[![sonar-plugin version](https://img.shields.io/github/v/release/green-code-initiative/creedengo-javascript?label=SonarQube%20plugin)](https://github.com/green-code-initiative/creedengo-javascript/releases/latest)
41+
[![eslint-plugin version](https://img.shields.io/npm/v/@creedengo/eslint-plugin?label=ESLint%20plugin)](https://npmjs.com/package/@creedengo/eslint-plugin)
4542

4643
**The plugin is available from the official SonarQube marketplace! Check the
4744
[version matrix here](https://docs.sonarsource.com/sonarqube/latest/instance-administration/plugin-version-matrix/).**
4845

4946
Ready to use binaries for SonarQube are also
50-
available [from GitHub](https://github.com/green-code-initiative/ecoCode-javascript/releases). \
47+
available [from GitHub](https://github.com/green-code-initiative/creedengo-javascript/releases). \
5148
Make sure to place the binary inside `extensions/plugins/` folder of your SonarQube instance.
5249

53-
The standalone version of the ESLint plugin is available from [npmjs](https://npmjs.com/package/@ecocode/eslint-plugin).
50+
The standalone version of the ESLint plugin is available from [npmjs](https://npmjs.com/package/@creedengo/eslint-plugin).
5451

55-
🧩 Compatibility
56-
----------------
52+
## 🧩 Compatibility
5753

5854
| Plugins Version | SonarQube version | ESLint version |
59-
|-----------------|-------------------|----------------|
55+
| --------------- | ----------------- | -------------- |
6056
| 1.4.+, 1.5.+ | 9.9.+ LTA to 10.7 | 7+ |
6157

62-
🤝 Contribution
63-
---------------
58+
## 🤝 Contribution
6459

6560
You have an idea or you want to help us improving this project? \
6661
We are open to your suggestions and contributions! Open an issue or PR 🚀
6762

6863
Check out the [CONTRIBUTING.md](CONTRIBUTING.md) file
6964
and follow the various guides to start contributing.
7065

71-
Thank you to all the people who already contributed to ecoCode-javascript!
66+
Thank you to all the people who already contributed to creedengo-javascript!
7267

7368
- Elise Dubillot
7469
- Laetitia Bézie

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
name: sonarqube_ecocode_javascript
2+
name: sonarqube_creedengo_javascript
33

44
services:
55
sonar:
66
image: sonarqube:10.7-community
7-
container_name: sonar_ecocode_javascript
7+
container_name: sonar_creedengo_javascript
88
ports:
99
- "9000:9000"
1010
networks:
@@ -19,8 +19,8 @@ services:
1919
SONAR_ES_BOOTSTRAP_CHECKS_DISABLE: "true"
2020
volumes:
2121
- type: bind
22-
source: ./sonar-plugin/target/ecocode-javascript-plugin-1.5.1-SNAPSHOT.jar
23-
target: /opt/sonarqube/extensions/plugins/ecocode-javascript-plugin-1.5.1-SNAPSHOT.jar
22+
source: ./sonar-plugin/target/creedengo-javascript-plugin-1.5.1-SNAPSHOT.jar
23+
target: /opt/sonarqube/extensions/plugins/creedengo-javascript-plugin-1.5.1-SNAPSHOT.jar
2424
- "extensions:/opt/sonarqube/extensions"
2525
- "logs:/opt/sonarqube/logs"
2626
- "data:/opt/sonarqube/data"
@@ -32,7 +32,7 @@ services:
3232

3333
db:
3434
image: postgres:16-alpine
35-
container_name: postgresql_ecocode_javascript
35+
container_name: postgresql_creedengo_javascript
3636
networks:
3737
- sonarnet
3838
volumes:

eslint-plugin/.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* ecoCode JavaScript plugin - Provides rules to reduce the environmental footprint of your JavaScript programs
3-
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
2+
* creedengo JavaScript plugin - Provides rules to reduce the environmental footprint of your JavaScript programs
3+
* Copyright © 2023 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

0 commit comments

Comments
 (0)