Skip to content

Commit 0e7649a

Browse files
committed
Merge branch 'main' into EC505-avoid-keep-awake
2 parents cfec8cd + 3360ca3 commit 0e7649a

File tree

113 files changed

+3159
-2044
lines changed

Some content is hidden

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

113 files changed

+3159
-2044
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/build.yml renamed to .github/workflows/ci.yml

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Build
1+
name: CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
tags:
7-
- '[0-9]+.[0-9]+.[0-9]+'
7+
- "[0-9]+.[0-9]+.[0-9]+"
88
pull_request:
9-
types: [ opened, synchronize, reopened ]
9+
types: [opened, synchronize, reopened]
1010

1111
jobs:
1212
test:
@@ -15,8 +15,8 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [ 18.x, 20.x ]
19-
java-version: [ 11 ]
18+
node-version: [18.x, 20.x]
19+
java-version: [11]
2020

2121
steps:
2222
- name: Checkout
@@ -30,7 +30,7 @@ jobs:
3030
node-version: ${{ matrix.node-version }}
3131

3232
- name: Use JDK ${{ matrix.java-version }}
33-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@v4
3434
with:
3535
distribution: temurin
3636
java-version: ${{ matrix.java-version }}
@@ -52,11 +52,41 @@ jobs:
5252
working-directory: sonar-plugin
5353

5454
- name: SonarCloud Scan
55-
uses: SonarSource/sonarcloud-github-action@master
55+
uses: SonarSource/sonarqube-scan-action@master
5656
if: |
5757
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
5858
matrix.node-version == '20.x' &&
5959
github.actor != 'dependabot[bot]'
6060
env:
6161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6262
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
63+
64+
integration-test:
65+
name: Integration test
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v4
71+
72+
- name: Use Node.js 20.x
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: 20.x
76+
77+
- name: Use JDK 11
78+
uses: actions/setup-java@v4
79+
with:
80+
distribution: temurin
81+
java-version: 11
82+
83+
- name: Install dependencies
84+
run: yarn install --immutable
85+
working-directory: eslint-plugin
86+
87+
- name: Build SonarQube plugin
88+
run: mvn -e -B package
89+
working-directory: sonar-plugin
90+
91+
- name: Check SonarQube with the plugin
92+
run: docker compose up --wait

.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 }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ dependency-reduced-pom.xml
1010

1111
# Auto-generated files
1212
coverage
13-
dist

CHANGELOG.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- Add support for SonarQube up to 10.5
12+
- [#40](https://github.com/green-code-initiative/creedengo-javascript/pull/40) Add rule `@creedengo/avoid-autoplay` (GCI36)
13+
- [#46](https://github.com/green-code-initiative/creedengo-javascript/pull/46) Add rule `@creedengo/prefer-lighter-formats-for-image-files` (GCI31)
14+
15+
## [2.0.0] - 2025-01-22
16+
17+
### Added
18+
19+
- [#39](https://github.com/green-code-initiative/creedengo-javascript/issues/39) Add rule `@creedengo/avoid-brightness-override` (GCI522)
20+
- [#41](https://github.com/green-code-initiative/creedengo-javascript/pull/41) Add rule `@creedengo/no-torch` (GCI530)
21+
- [#58](https://github.com/green-code-initiative/creedengo-javascript/pull/58) Add support for SonarQube up to 25.1
1322

1423
### Changed
1524

25+
- [#56](https://github.com/green-code-initiative/creedengo-javascript/issues/56) **BREAKING:** Rename plugin to creedengo-javascript
26+
- [#44](https://github.com/green-code-initiative/creedengo-javascript/pull/44) Implement the rule GCI523 for React Native
27+
- [#52](https://github.com/green-code-initiative/creedengo-javascript/pull/52) Remove trailing dots in Sonar rules descriptions
28+
- [#62](https://github.com/green-code-initiative/creedengo-javascript/pull/62) Fix style attribute checks in GCI26 and GCI29
1629
- Update Docker Compose configuration file to V2
1730

31+
### Deleted
32+
33+
- [#44](https://github.com/green-code-initiative/creedengo-javascript/pull/44) Merge the rule EC8 with GCI523
34+
1835
## [1.5.0] - 2024-03-13
1936

2037
### Added
@@ -73,7 +90,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7390
- Setup basic coding style tools
7491
- Write complete contributing guide
7592

76-
[Unreleased]: https://github.com/green-code-initiative/ecoCode-javascript/compare/1.5.0...HEAD
93+
[Unreleased]: https://github.com/green-code-initiative/creedengo-javascript/compare/2.0.0...HEAD
94+
95+
[2.0.0]: https://github.com/green-code-initiative/creedengo-javascript/compare/1.5.0...2.0.0
7796

7897
[1.5.0]: https://github.com/green-code-initiative/ecoCode-javascript/compare/1.4.0...1.5.0
7998

CONTRIBUTING.md

Lines changed: 8 additions & 8 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,9 +49,9 @@ 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
54-
the [dedicated documentation](https://github.com/green-code-initiative/ecoCode/blob/main/ecocode-rules-specifications/README.md)
54+
the [dedicated documentation](https://github.com/green-code-initiative/creedengo-rules-specifications/blob/main/README.md#creedengo-rules-specification-repository)
5555
to find out how to proceed.
5656

5757
### In the ESLint plugin
@@ -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

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.PHONY: all clean
2+
3+
all: build
4+
5+
clean:
6+
cd sonar-plugin && mvn clean
7+
8+
build: clean
9+
cd sonar-plugin && mvn package -DskipTests
10+
11+
compile: clean
12+
cd sonar-plugin && mvn compile
13+
14+
docker-clean:
15+
docker compose down --volumes
16+
17+
docker-init:
18+
docker compose up --build -d
19+
20+
docker-logs:
21+
docker compose logs -f
22+
23+
start:
24+
docker compose start
25+
26+
stop:
27+
docker compose stop

0 commit comments

Comments
 (0)