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
ReturnCount 1.22.0 crashes on valid 1.21.0 config property excludedFunctions when using --all-rules cli flag #5323
Comments
Yup that's "expected" I guess as we updated the type of that property. I omitted it from the "notable changes" but it feels like we want to make it more prominent: |
Hm, as far as I see in the linked PR there is a testcase to verify the rule still works with a string property. |
Nope there is no such test. All the tests are checking against a The alternative approach here would be to deprecate |
Hm, I see detekt/detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/ReturnCountSpec.kt Lines 300 to 311 in d516562
which takes detekt/detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/ConfigProperty.kt Lines 126 to 134 in 16b6658
Edit: Edit2: |
Yes, this should be a deprecation warning but it should work. I think that were we stop suportting |
Expected Behavior
Configuration without migration entry in changelog should work in next minor version.
Observed Behavior
Caused by: java.lang.IllegalStateException: Value "[equals]" set for config parameter "style > ReturnCount > excludedFunctions" is not of required type String.
When using
--all-rules
cli flag.Steps to Reproduce
CLI
java -jar detekt-cli/build/libs/detekt-cli-1.22.0-RC1-all.jar -c ~/dotfiles/detekt/detekt.yml -i detekt-cli/build/resources/test/cases/Poko.kt --all-rules
IJ plugin
Context
Testing 1.22.0-RC1
Your Environment
The text was updated successfully, but these errors were encountered: