Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Swift rules from ecocode-ios #224

Merged

Conversation

gaelfoppolo
Copy link
Contributor

Summary

This PR adds the Swift rules implemented in ecoCode-iOS repository.

@gaelfoppolo gaelfoppolo marked this pull request as ready for review August 24, 2023 14:20
@zippy1978 zippy1978 self-requested a review August 25, 2023 08:52
Copy link
Member

@dedece35 dedece35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your point of view @jycr ???

ecocode-rules-specifications/src/main/assembly/swift.xml Outdated Show resolved Hide resolved
ecocode-rules-specifications/src/main/assembly/swift.xml Outdated Show resolved Hide resolved
ecocode-rules-specifications/src/main/assembly/swift.xml Outdated Show resolved Hide resolved
@dedece35
Copy link
Member

Hi @gaelfoppolo,
like I said in #226, I think we have to wait the merge of #209 before merging this current PR.
make this PR as draft.

Copy link

github-actions bot commented Nov 6, 2023

This PR has been automatically marked as stale because it has no activity for 30 days.
Please add a comment if you want to keep the issue open. Thank you for your contributions!

@github-actions github-actions bot added the stale label Nov 6, 2023
@gaelfoppolo
Copy link
Contributor Author

It seems #209 was merged. Can someone re-review?

zippy1978
zippy1978 previously approved these changes Nov 7, 2023
@zippy1978
Copy link
Contributor

@jycr , @dedece35 ,
It seems the rules added in the PR are already on the main branch.
Can you confirm we can close it without merging ? (and then start pointing to the new rule repository from the ios plugin)

Copy link
Member

@dedece35 dedece35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one thing to approve this PR : add a CHANGELOG.md modification to explain this PR, please

@dedece35
Copy link
Member

dedece35 commented Nov 8, 2023

@jycr , @dedece35 , It seems the rules added in the PR are already on the main branch. Can you confirm we can close it without merging ? (and then start pointing to the new rule repository from the ios plugin)

@zippy1978, after checking th main branch, no, these rules don't exist already in "ecocode-rules-specifications" directory. Thus, for me, this PR must be merged, once my modification request done.

"ecocode"
],
"defaultSeverity": "Major",
"compatibleLanguages": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's useful to set this property.

Additionally, JSON in rule folder level is supposed to be language agnostic.
For language specificities, it would be necessary to be able to manage a JSON override with a JSON file placed in the corresponding subfolder language directory.

The ability to overload JSON metadata is currently not implemented (but could be if necessary).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I followed the template of the others rules at the time (late August) and almost all of them had this property and still are (eg: EC11, EC12, etc.).

So what should I do, remove or leave it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, leave it like that.
We improve metadata in future commits if needed

@gaelfoppolo
Copy link
Contributor Author

@jycr , @dedece35 , It seems the rules added in the PR are already on the main branch. Can you confirm we can close it without merging ? (and then start pointing to the new rule repository from the ios plugin)

@zippy1978, after checking th main branch, no, these rules don't exist already in "ecocode-rules-specifications" directory. Thus, for me, this PR must be merged, once my modification request done.

I double-checked and here the matching I've got (also with some inconsistencies):

  • EC19 is redundant with EC524 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC21 is redundant with EC524 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC19 and EC21 are also redundant with EC522 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC18 is redundant with EC521
  • EC15 is redundant with EC506 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC14 is redundant with EC505 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC16 is redundant with EC602 (which itself doesn't even have a JSON)
  • EC20 is redundant with EC547 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC17 is redundant with EC543

@gaelfoppolo
Copy link
Contributor Author

only one thing to approve this PR : add a CHANGELOG.md modification to explain this PR, please

Done!

@dedece35
Copy link
Member

dedece35 commented Nov 10, 2023

@jycr , @dedece35 , It seems the rules added in the PR are already on the main branch. Can you confirm we can close it without merging ? (and then start pointing to the new rule repository from the ios plugin)

@zippy1978, after checking th main branch, no, these rules don't exist already in "ecocode-rules-specifications" directory. Thus, for me, this PR must be merged, once my modification request done.

I double-checked and here the matching I've got (also with some inconsistencies):

  • EC19 is redundant with EC524 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC21 is redundant with EC524 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC19 and EC21 are also redundant with EC522 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC18 is redundant with EC521
  • EC15 is redundant with EC506 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC14 is redundant with EC505 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC16 is redundant with EC602 (which itself doesn't even have a JSON)
  • EC20 is redundant with EC547 (which itself is buggy since JSON and ASCIIDoc don't match)
  • EC17 is redundant with EC543

@gaelfoppolo thank you for these observations, good job.
@zippy1978, please check redunduncy and what we have to do with them.

dedece35
dedece35 previously approved these changes Dec 1, 2023
Copy link
Member

@dedece35 dedece35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jycr ... your recent point of view ?

jycr
jycr previously approved these changes Dec 5, 2023
@dedece35 dedece35 dismissed stale reviews from jycr and themself via 6ee598b December 5, 2023 08:18
Copy link

sonarcloud bot commented Dec 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dedece35 dedece35 merged commit e854f83 into green-code-initiative:main Dec 5, 2023
3 checks passed
@gaelfoppolo gaelfoppolo deleted the feature/add-swift-rules branch December 5, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 👀 review done 👀 👀 review done - waiting for changes 🚀 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants