-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Use annotations to configure rules in rules-naming #3769
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3769 +/- ##
=========================================
Coverage 83.52% 83.52%
Complexity 2915 2915
=========================================
Files 452 452
Lines 8765 8767 +2
Branches 1665 1665
=========================================
+ Hits 7321 7323 +2
Misses 542 542
Partials 902 902
Continue to review full report at Codecov.
|
...-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/ForbiddenClassName.kt
Show resolved
Hide resolved
const val VARIABLE_PATTERN = "variablePattern" | ||
const val PRIVATE_VARIABLE_PATTERN = "privateVariablePattern" | ||
const val EXCLUDE_CLASS_PATTERN = "excludeClassPattern" |
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 still need these constants?
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.
Yes, they are used in NamingConventionCustomPatternTest
which tests multiple rules at the same time and I think it would lead to confusion if they were inlined there. This way you at least have a chance to see where they are coming from.
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.
We should simplify split that test in multiple ones. But that's completely out of the scope of this PR.
...-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/ForbiddenClassName.kt
Show resolved
Hide resolved
const val VARIABLE_PATTERN = "variablePattern" | ||
const val PRIVATE_VARIABLE_PATTERN = "privateVariablePattern" | ||
const val EXCLUDE_CLASS_PATTERN = "excludeClassPattern" |
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.
We should simplify split that test in multiple ones. But that's completely out of the scope of this PR.
...-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/ForbiddenClassName.kt
Outdated
Show resolved
Hide resolved
@BraisGabin Let's use #3784 to document configuration naming / deprecations |
This belongs to #3670 and replaces all configuration kdoc tags in
rules-naming
with annotations.