Implement new rule GCI99#184
Open
rroot47 wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Java rule GCI99 to detect usage of common CSV libraries (via imports) and recommend using columnar formats like Parquet, and wires it into the plugin’s rule set, quality profile, and tests.
Changes:
- Added the GCI99 rule implementation (
AvoidCSVFormat) and registered it inJavaCheckRegistrar. - Added rule metadata documentation/resources (
GCI99.json,GCI99.html) and enabled the rule increedengo_way_profile.json. - Added unit + integration test coverage for the new rule (JUnit
CheckVerifier+GCIRulesIT+ IT test-project sources).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/org/greencodeinitiative/creedengo/java/checks/AvoidCSVFormat.java | Implements the GCI99 rule by flagging imports from known CSV libraries. |
| src/main/java/org/greencodeinitiative/creedengo/java/JavaCheckRegistrar.java | Registers the new check so it is executed during analysis. |
| src/main/resources/org/greencodeinitiative/creedengo/java/creedengo_way_profile.json | Adds GCI99 to the “creedengo way” quality profile. |
| src/main/resources/org/green-code-initiative/rules/java/GCI99.json | Adds rule metadata (severity/type/tags/remediation). |
| src/main/resources/org/green-code-initiative/rules/java/GCI99.html | Adds end-user rule documentation with examples. |
| src/test/java/org/greencodeinitiative/creedengo/java/checks/GCI99/AvoidCSVFormatTest.java | Adds unit tests validating issues/no-issues for the rule. |
| src/it/test-projects/creedengo-java-plugin-test-project/src/main/java/org/greencodeinitiative/creedengo/java/checks/GCI99/AvoidCSVFormat.java | Adds an IT test-project source containing noncompliant imports. |
| src/it/test-projects/creedengo-java-plugin-test-project/src/main/java/org/greencodeinitiative/creedengo/java/checks/GCI99/AvoidCSVFormatNoIssue.java | Adds an IT test-project source intended to be compliant. |
| src/it/java/org/greencodeinitiative/creedengo/java/integration/tests/GCIRulesIT.java | Adds integration tests asserting expected issues for GCI99. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
80682b5 to
e2505d6
Compare
rducasse
requested changes
May 20, 2026
rducasse
left a comment
There was a problem hiding this comment.
Only 3 of the 6 entries declared in CSV_PACKAGES are tested. Please add noncompliant entries for:
- import com.fasterxml.jackson.dataformat.csv.CsvMapper;
- import org.supercsv.io.CsvBeanWriter;
- import net.sf.flatpack.DataSet;
Also update GCIRulesIT.testGCI99() startLines/endLines accordingly.
8277f1a to
81b7c7d
Compare
rducasse
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.