-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
Remove aliases from Rule
api
#7312
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7312 +/- ##
============================================
- Coverage 84.76% 84.73% -0.03%
+ Complexity 3992 3967 -25
============================================
Files 578 575 -3
Lines 12026 11996 -30
Branches 2477 2478 +1
============================================
- Hits 10194 10165 -29
+ Misses 606 598 -8
- Partials 1226 1233 +7 ☔ View full report in Codecov by Sentry. |
8905184
to
2d3b746
Compare
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.
I like this one! 👍
Perhaps the only thing to add is some documentation to the website as not aliases
is a configurable key that users can override via the config file.
|
Good call! I added the documentation, what do you think? |
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.
LGTM 🚀
The aliases are a really cool feature from
detekt
. But we can put that information in the configuration instead of the actual code of the rule.This PR removes
aliases
andgetDefaultRuleIdAliases
fromRule
in favor of the annotation@Alias
. Also this fixes an issue in our documentation. Some rules were not displaying their aliases, for example:FunctionNameMaxLength
:Before: https://detekt.dev/docs/rules/naming#functionmaxlength
After: https://detekt-4art7d1zf-detekt.vercel.app/docs/next/rules/naming#functionnamemaxlength
This new implementation fix that and should prevent future errors.