-
-
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
Cannot disable OptionalWhenBraces with warningsAsErrors: true #6336
Comments
Up! With the new version |
Is this a regression of |
Yup so this was introduced by: fa788eb The workaround is to don't use |
Yeah, the only way to do that is to list all other rules, or use the default config, which means |
Ah I see what happened. I don't know how do we want to handle this as practically we're deprecating a rule for the sake of 2.0. So you will have a warning if you use that rule (also with Perhaps |
I think that's a good one! It assumes that "replacement" will be available, but I think that's a fair assumption. |
@cortinico I think this should be fixed on 1.x, because right now it's not possible to upgrade from 1.23.0 to 1.23.1 (and future), unless:
neither of which sound good as a workaround. I had a quick look at "skipping deprecated rules", but the information is readily available in Little off topic: should we have a "next 1.x patch" milestone? |
Yup we should fix this, I don't have the time to look into the ignore deprecated rules, but the easiest way for me would be to just keep a That is needed only for 1.x anyway
As of now, I'm tracking them using the "pick request" label, but we can create the |
Expected Behavior
Should be able to disable deprecated rules, or maybe be disabled by default?
Observed Behavior
Either have many OptionalWhenBraces violations or
Steps to Reproduce
Context
I shouldn't have to choose between having a strict build, or having a short configuration file (allRules + overrides), or having a customized detekt config (active: false). I'm not fully sure what's going on here, and why this never happened before, but it's a strange situation and I wonder what you guys think about it.
Can you think of a workaround for this apart from disabling
warningsAsErrors
, or listing all the rules explicitly rather than excluding the ones I don't want?Your Environment
--scan
option when running the gradle task): N/AThe text was updated successfully, but these errors were encountered: