[java] Remove java statistical rules#1772
Merged
Merged
Conversation
Generated by 🚫 Danger |
jsotuyod
approved these changes
Sep 6, 2019
Merged
Member
Author
|
Thanks for merging @jsotuyod ! :) |
13 tasks
This was referenced Jan 10, 2023
8 tasks
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.
Followup on #1750, refs #1432
This removes Java statistical rules. Basically I duplicate nearly exactly AbstractCounterCheckRule from #1750. It can't really be abstracted as both those base rule classes need to extend eg AbstractJavaRule.
Also, this removes the old Ncss rules instead of porting them. They've been deprecated since 5.8.0 IIRC.
I add one thing: AbstractJavaRulechainRule. The constraint of not calling
super.visitwhen a rule uses the rulechain is error-prone and not user friendly. Just having a base class where super.visit doesn't recurse solves this. It also requires rulechain visits in the constructor. Converting an existing rule just means extending this base class.This design is cool but highlights the fact that there's no way to add a rulechain visit to an abstract type for now, which will become important for the 7.0.0 java grammar, which heavily uses interfaces. As such the design is awkward, but I don't expect it to last. I'll open an issue for that as soon as I have time -> #1785