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
allRules = true has no effect when buildUponDefaultConfig = true #4926
Comments
This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days. |
I was looking at this issue. And I found tests that asserts exactly the behaviour that you describes. If I "fix" this issue I would break those tests. I agree that the behaviour is strange but I don't want to expend more time on this. If anyone want to go deep in the rabbit hole and find out why we have that behaviour I would happy to read the findings. The configuration of detekt is something that should be rewritten for 2.0. My findings:
My two cents: We should probably remove |
This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days. |
Interested +1 |
Which of the two expected behaviours would you expect, @mustafaozhan (and any other watchers, if any)? |
My understanding should be as below:
So either of the flags shouldn't override the other one and if a user want's to all in, then they have to enable both. So when
Are set, I expect to use default configuration for stable checks, together with experimental checks. Let me know if I misunderstood, I just subscribed to this issue because of the title :) |
IMHO that should be the preferred behaviour.
@mustafaozhan There are no 'experimental' rules though. The Also, I believe that the semantic of:
Should result in having |
Agree with @mustafaozhan, he summed it up very nicely. No warnings necessary, because it's the wanted behaviour. I expected point 1 in OP too. |
Yea I think I got confused from the Android Studio plugin, I remember in the past there was experimental term in the config. Anyway, I think none of the flag really should affect the other one (if we can do...). What I understand from your comment is |
may be also valid setup, albeit a bit confusing since defaults are not used, but that's what the configurator asked for. If any combination of the flags could be valid, and even though one implies the other (by default if not explicitly set (impl: convention property value)). Setting both to true would just make reading the Gradle configuration easier, if the author chooses to be explicit. Setting both doesn't change the behaviour and doesn't cause any problems, so there is no need for a warning. |
This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days. |
What's the next step here? Is this a candidate for https://github.com/detekt/detekt/milestone/42? |
This should be doable on 1.x. To me it doesn't have a high priority but it's up to grab by anyone. |
Expected Behavior
One of:
allRules
enables all rules on top of using the default config (which seems to be the code (AllRulesConfig
) anyway.Observed Behavior
When configuring
DetektExtension
bahaves the same as
Steps to Reproduce
Will produce if necessary.
Context
I want to go all in, making a reusable strictest configuration I can make, by enabling all checks, but keeping it open that any new Detekt improvements are automatically added.
Your Environment
--scan
option when running the gradle task): N/AThe text was updated successfully, but these errors were encountered: