-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
Fix shared variable in detekt-extension rules #1897
Conversation
@@ -40,6 +40,7 @@ class TooManyFunctionsTwo(config: Config) : ThresholdRule(config, THRESHOLD) { | |||
references = emptyList()) | |||
) | |||
} | |||
amount = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need two example rules that basically do the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's to demonstrate how the rule provider works when registering multiple rules (one with, one without custom config)? But maybe removing the second example and just adding a comment to SampleProvider
is enough.
They don't require much maintenance though so we could just leave it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That exactly was the intention. One can be configured, the other not. One reports ThresholdedCodeSmell other just CodeSmell.
Codecov Report
@@ Coverage Diff @@
## master #1897 +/- ##
=========================================
Coverage 80.25% 80.25%
Complexity 1949 1949
=========================================
Files 325 325
Lines 5504 5504
Branches 1019 1019
=========================================
Hits 4417 4417
Misses 557 557
Partials 530 530 Continue to review full report at Codecov.
|
@@ -40,6 +40,7 @@ class TooManyFunctionsTwo(config: Config) : ThresholdRule(config, THRESHOLD) { | |||
references = emptyList()) | |||
) | |||
} | |||
amount = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That exactly was the intention. One can be configured, the other not. One reports ThresholdedCodeSmell other just CodeSmell.
* Fix shared variable in detekt-extension rules * Use KtFile instead of PsiFile visitor
* Fix shared variable in detekt-extension rules * Use KtFile instead of PsiFile visitor
* Fix shared variable in detekt-extension rules * Use KtFile instead of PsiFile visitor
* Fix shared variable in detekt-extension rules * Use KtFile instead of PsiFile visitor
No description provided.