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

Deprecate rule EC4 for Java because not applicable #243

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

utarwyn
Copy link
Member

@utarwyn utarwyn commented Nov 21, 2023

After discussion in #233, we confirmed that the rule "Use global variables" was not applicable to the Java language.
This PR therefore removes it completely from the Java plugin and rules specifications.

I've decided to remove it rather than deprecate it, as it proposes incorrect information that I don't think should be left in the plugin. This way, they should no longer appear in SonarQube analyses, as soon as an instance has been updated.

Thanks for the discussion and feedback on this rule. It's how we manage to fine-tune the plugin and come up with the most relevant rules possible.

Resolves #233

@utarwyn utarwyn added the 🗃️ rule rule improvment or rule development or bug label Nov 21, 2023
@utarwyn utarwyn requested a review from dedece35 November 21, 2023 18:19
@utarwyn utarwyn self-assigned this Nov 21, 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.

I don't understand why delete it instead of make it deprecated .
For me deprecation is also to remember that EC4 was an old rule id and not to use this rule id in future rule.
For me it's not clear when do we deprecate or delete one rule.
@glalloue, @jhertout, @utarwyn, @olegoaer ?

@jhertout
Copy link
Contributor

Hello,

I agree with @dedece35, I think we must depreciate the rule in a first time if we want to be rigorous. Since our plugin is public I think it is important for us to try to follow this process even if I understand that it can be frustrating.

@utarwyn
Copy link
Member Author

utarwyn commented Nov 29, 2023

I will deprecate it first, you are right. Let me change this. But I will need #242 in order to do it properly. We can discuss the process around rule deprecation/deletion during the next meeting if you want.

@utarwyn utarwyn marked this pull request as draft November 29, 2023 09:53
@utarwyn utarwyn changed the title Remove rule EC4 for Java because not applicable Deprecate rule EC4 for Java because not applicable Nov 29, 2023
@utarwyn utarwyn force-pushed the issue-233-remove-ec4-java branch from 9fef634 to 2b0d4b0 Compare November 29, 2023 21:56
@utarwyn
Copy link
Member Author

utarwyn commented Nov 29, 2023

In order to have a smoother transition before the rule deletion, I have deprecated it. You can see the result in the SonarQube UI below. It will now be necessary to define how long it remains deprecated, but this will be discussed at the next meeting. I kept the unit test and implementation, to keep it working before everyone turned it off in quality profiles.

image

@dedece35
Copy link
Member

dedece35 commented Dec 1, 2023

to discuss in core-team : deprecation if this rule only for java

@utarwyn utarwyn force-pushed the issue-233-remove-ec4-java branch from 8ec9e9d to 628f246 Compare December 4, 2023 23:28
@utarwyn utarwyn force-pushed the issue-233-remove-ec4-java branch from 628f246 to 3176b02 Compare December 4, 2023 23:32
@utarwyn utarwyn marked this pull request as ready for review December 4, 2023 23:38
@utarwyn utarwyn requested a review from dedece35 December 4, 2023 23:38
Copy link

sonarqubecloud 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
0.0% 0.0% Duplication

@dedece35 dedece35 merged commit 0e307b3 into main Dec 5, 2023
3 checks passed
@dedece35 dedece35 deleted the issue-233-remove-ec4-java branch December 5, 2023 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏗️ refactoring refactoring for best practices 🗃️ rule rule improvment or rule development or bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EC4][Java] Rule is not applicable to Java
3 participants