Skip to content

Commit

Permalink
Merge branch 'main' into rule/merging_main
Browse files Browse the repository at this point in the history
* main: (76 commits)
  docker-compose update for current version
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release 1.2.1
  prepare 1.2.1 version - CHANGELOG.md update
  green-code-initiative#63 fix: fixes metadata generation task from SonarSource/sonar-update-center-properties
  correction typo CHANGELOG.md
  end of 1.2.0 release : change docker-compose to 1.2.1-SNAPSHOT
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release 1.2.0
  prepare 1.2.0 version - CHANGELOG.md update
  prepare 1.2.0 version
  [ISSUE 177] Rename property in pom (green-code-initiative#177)
  upgrade CHANGELOG.md
  [ISSUE 173] correction issue description
  [ISSUE 161] ➖ Remove unused junit dependency
  [ISSUE 173] correction of unit tests :(
  update CHANGELOG
  update CHANGELOG with recent issues - improve
  update CHANGELOG with recent issues
  [ISSUE 173] update description issue (to really describe what the rule does)
  ...

# Conflicts:
#	python-plugin/src/main/java/fr/greencodeinitiative/python/PythonRuleRepository.java
#	python-plugin/src/test/java/fr/greencodeinitiative/python/PythonRuleRepositoryTest.java
  • Loading branch information
jberque committed Apr 24, 2023
2 parents 5df299e + d715436 commit d3aa776
Show file tree
Hide file tree
Showing 145 changed files with 934 additions and 710 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ensure all SH files are checked out with LF line endings (regardless of the
# OS they were checked out on).
*.sh text eol=lf

# Ensure BAT files will always be checked out with CRLFs (regardless of the
# OS they were checked out on).
*.bat text eol=crlf
8 changes: 5 additions & 3 deletions .github/workflows/build_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ on:
- main
tags:
- '*'
pull_request:
branches:
- main
# pull_request:
# branches:
# - main

env:
# github.repository as <account>/<repo>
IMAGE_NAME: sonarqube-ecocode
IMAGES: |
ghcr.io/${{ github.repository_owner }}/sonarqube-ecocode
jobs:
Build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
permissions:
contents: read
packages: write
Expand Down
16 changes: 11 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
!.gitignore
!.github/**/*.*
# Ignore all files and folders starting with ".", except a few exceptions
.*
!.gitignore
!.gitattributes
!.github/

# Ignore generated files
target
*.iml
lib/*.jar
lib
bin
dependency-reduced-pom.xml
dependency-reduced-pom.xml

# Ignore IDE files
*.iml
61 changes: 57 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

### Changed

### Deleted

## [1.2.1] - 2023-04-18

### Added

### Changed

- [#180](https://github.com/green-code-initiative/ecoCode/pull/180) correction of SonarQube review for MarketPlace (sonar plugin)

### Deleted

## [1.2.0] - 2023-04-14

### Added

- [#171](https://github.com/green-code-initiative/ecoCode/issues/171) Add migration mechanism to support "issue re-keying"

### Changed

- [#161](https://github.com/green-code-initiative/ecoCode/pull/161) Remove unnecessary junit dependencies in pom.xml
- [#166](https://github.com/green-code-initiative/ecoCode/issues/166) Correction of wrong message of rule EC63
- [#167](https://github.com/green-code-initiative/ecoCode/issues/167) Use same kind for rules across different languages
- [#173](https://github.com/green-code-initiative/ecoCode/issues/173) Update issue description of rule EC34 (try-catch)

### Deleted

## [1.1.0] - 2023-04-03

### Changed

- [#63](https://github.com/green-code-initiative/ecoCode/issues/63) Update plugins to be compliant for SonarQube MarketPlace integration ( PR [#79](https://github.com/green-code-initiative/ecoCode/pull/79) )
- [#88](https://github.com/green-code-initiative/ecoCode/pull/88) upgrade rules matrix with new ids + refactoring rules documentation (`RULES.md`)

### Deleted

- [#85](https://github.com/green-code-initiative/ecoCode/issues/85) Cleaning some useless classes on PHP plugin

## [1.0.0] - 2023-03-24

### Added

- [#44](https://github.com/green-code-initiative/ecoCode/pull/44) Update the PHP description rules
- [#67](https://github.com/green-code-initiative/ecoCode/pull/67) Add JavaScript plugin
- add `ecocode` tag on all rules on Java, PHP, Python and javascript plugins

### Changed

Expand All @@ -23,6 +68,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#71](https://github.com/green-code-initiative/ecoCode/issues/71) After an PHP analysis, no ecocode code smells appears in my Sonar project
- [#64](https://github.com/green-code-initiative/ecoCode/issues/64) Python: ecoCode plugin with SonarQube, no code-smell detection
- [#55](https://github.com/green-code-initiative/ecoCode/issues/55) rename `eco-conception` tag of rules to `eco-design`
- [#76](https://github.com/green-code-initiative/ecoCode/issues/76) correction of SonarQube plugins homepage link broken
- documentation upgrade

### Deleted

Expand All @@ -45,8 +92,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.2.1] - 2022-12-30

### Added

### Changed

- [#22](https://github.com/green-code-initiative/ecoCode/issues/22) Error when running sonar scan with ecocode
Expand All @@ -68,7 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- [161](https://github.com/cnumr/ecoCode/issues/161) adding tool to update tags of native rules with our custom tags
- [#161](https://github.com/cnumr/ecoCode/issues/161) adding tool to update tags of native rules with our custom tags

### Changed

Expand All @@ -81,7 +126,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- First official release of ecocode plugins : java plugin, php plugin and python plugin

[unreleased]: https://github.com/green-code-initiative/ecoCode/compare/v0.2.2...HEAD
[unreleased]: https://github.com/green-code-initiative/ecoCode/compare/v1.2.1...HEAD

[1.2.1]: https://github.com/green-code-initiative/ecoCode/compare/v1.2.0...v1.2.1

[1.2.0]: https://github.com/green-code-initiative/ecoCode/compare/v1.1.0...v1.2.0

[1.1.0]: https://github.com/green-code-initiative/ecoCode/compare/v1.0.0...v1.1.0

[1.0.0]: https://github.com/green-code-initiative/ecoCode/compare/v0.2.2...v1.0.0

[0.2.2]: https://github.com/green-code-initiative/ecoCode/compare/v0.2.1...v0.2.2

Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ the project is to provide a list of static code analyzers to highlight code stru
ecological impact: energy and resources over-consumption, "fatware", shortening terminals' lifespan, etc.

_ecoCode_ is based on evolving catalogs of [good practices](docs/rules), for various technologies. A SonarQube plugin
then implement these catalogs as rules for scanning your projects.
then implements these catalogs as rules for scanning your projects.

**Warning**: this is still a very early stage project. Any feedback or contribution will be highly appreciated. Please
refer to the contribution section.
Expand Down Expand Up @@ -54,17 +54,19 @@ JavaScript plugin works differently because it does not use AST. [More informati
------------------

You can give a try with a one command docker :
```

```sh
docker run -ti --rm \
-v sq_ecocode_logs:/opt/sonarqube/logs \
-v sq_ecocode_data:/opt/sonarqube/data \
-p 9000:9000 \
--name sonarqube-ecocode ghcr.io/green-code-initiative/sonarqube-ecocode:latest
```
And add the `eco-conception` tagged rules to Quality Profiles.

You can also download each plugin separatly and copy the plugin (jar file) to `$SONAR_INSTALL_DIR/extensions/plugins` and
restart SonarQube.
And add the `eco-design` tagged rules to Quality Profiles.

You can also download each plugin separatly and copy the plugin (jar file) to `$SONAR_INSTALL_DIR/extensions/plugins` and restart SonarQube.
Then you can use different test project repositories (please check `README.md` files inside) to test the environment. Example : [PHP test project](https://github.com/green-code-initiative/ecoCode-php-test-project)

Or you can directly use a [all-in-one docker-compose](INSTALL.md)

Expand All @@ -80,6 +82,8 @@ Ready to use binaries are available [from GitHub](https://github.com/green-code-
|------------------|----------------------------|
| 0.1.+ | SonarQube 8.9.+ LTS to 9.3 |
| 0.2.+ | SonarQube 9.4.+ LTS to 9.9 |
| 1.0.+ | SonarQube 9.4.+ LTS to 9.9 |
| 1.1.+ | SonarQube 9.4.+ LTS to 9.9 |

☕ Plugin Java part compatibility
------------------
Expand All @@ -88,6 +92,8 @@ Ready to use binaries are available [from GitHub](https://github.com/green-code-
|------------------|--------------|
| 0.1.+ | 11 / 17 |
| 0.2.+ | 11 / 17 |
| 1.0.+ | 11 / 17 |
| 1.1.+ | 11 / 17 |

🤝 Contribution
---------------
Expand Down
Loading

0 comments on commit d3aa776

Please sign in to comment.