https://kotlinlang.org logo
#detekt
Title
# detekt
s

seb

05/10/2022, 8:39 AM
Hi folks, after updating to 1.20.0, I get this error when building:
Copy code
Execution failed for task ':app:detekt'.
> Run failed with 1 invalid config property.
  	- Property 'formatting' is misspelled or does not exist.
If I take out the
formatting
section in the config (which is only setting
active: false)
, it works fine. Looking at the 1.20.0 release notes, there's a mention about something changing in how the formatting rules are configured, but there is no example, migration guide, nothing — only a link to a couple PRs with no documentation. I don't use the
formatting
plugin, so am I ok with just removing the corresponding section from the config? And how would it work if I actually wanted to use the plugin? I'm not super clear on this... do I need a separate config file? And if so, how do I associate it with the plugin?
P.S.: yes, I realise the
formatting
rule was not doing much before given I don't have the plugin in the classpath in the first place 🙂 It was ok to just remove it.
g

gammax

05/10/2022, 12:06 PM
Yup. Agree that this was maybe not super clear in the release notes. The actionable items for you would be to either: • Remove the
formatting
block from your config file • Add the
detekt-formatting
plugin We updated how the config is composed, allowing plugin to contribute to the final configuration file. What was happening for your practically is that you had keys that were not recognized.
👍 1
s

seb

05/10/2022, 12:25 PM
Thanks for confirming, Nicola :)
16 Views