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
Enable rules by default for 1.21
#4643
Comments
Thank you for taking the initiative. There are so many great rules that are not active by default right now. Here is the list of my candidates for 1.21. I am aware that some of them might not make the final cut. Edit: Trying to keep track of the current state of discussion here.
|
IIRC we decided to annotate them but we never did so right? |
I would like add |
Correct, we never did. Should we at least create the annotation so We have the option to do so in the future? |
@marschwar thanks you so much for that list with all the links! It's so easy to follow it! I'm not 100% bought with this one... I know in general it's a bad idea to have too much overload methods and probably that you are not using the polymorphism correctly. But to be honest 6 seems like a really good threshold to me.
This one will break lots of builds. This patter is really common: And I don't agree with this part of its description:
That issue is not related with functions returning implicit Edit: Thinking about this one... maybe if we exclude test by default on this one it have more sense to enable it.
I agree that it would be really nice but it was introduced in 1.20.0-RC1 so I'm not sure... we could talk about it once 1.20 is released.
I think this one is controversial too. I for sure will disable this one in my projects.
+1! I have them enabled in my code and they work perfectly fine. The other ones that I didn't comment here I agree 100% that we should enable them |
I agree with your concerns. I updated my comment above to keep track of the current state of the discussion. Hope that more users chime in as well. |
My own list (I'm not adding the onces that were mentioned already)
|
I am surprised NotImplementedDeclaration is not enabled by default :D |
I could get behind most of your suggestions, other than: strongly oppose -> candidates for
mildly oppose as that may cause many builds to break
To me this should stay active by default. |
I would like to give a more inside about two of those rules and why I think that they should be enabled:
(I agree with you in the other ones and I crosslined them) |
I guess our use cases differ. I usually work on the server side of things and when ever I use the implicit toString in string Interpolation in a log message, I actually want to see the "null" string. |
Good point. I crosslined it from the list. |
I'm changing my mind about enabling this rules:
|
All the rules that we add to detekt start disable by default. That's a good default because the early-adopters can give us feedback about them and we don't create a lot of noise for those users that prefer more stability.
But from time to time we should promote those rules and enable them by default. An example of rule that we could enable by default:
Which other rules do you think we should enable by default?
Note: There are some rules that are "controversial" and they will never become enable by default.
The text was updated successfully, but these errors were encountered: