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

Colton Idle

03/07/2023, 8:19 PM
Do people typically commit the entire detekt.yml configuration into their codebase? or do you just do 1 off changes in the yaml file?
👍 1
🧵 1
t

Thierry Merven

03/07/2023, 8:36 PM
Just the changes. You can specify your changes to overload the defaults.
b

Brais Gabin

03/07/2023, 11:19 PM
I commit the full default configuration. This way is really easy to know how each rule is configured and modify it as desired.
https://github.com/detekt/detekt/discussions/3558#discussioncomment-483027 then I use what is described in this comment to keep that configuration sync with the new versions of detekt.
l

LeoColman

03/07/2023, 11:48 PM
I commit the full default configuration. This way is really easy to know how each rule is configured and modify it as desired.
My problem with this approach is that I can't know which rule is customized and which is based on the default without comparing them, can I?
t

Thierry Merven

03/08/2023, 7:55 AM
Also you don't get new, removed or modified rules from detekt as it changes.
b

Brais Gabin

03/09/2023, 7:49 PM
Leonardo, you are right. But in general I only care about the updates on the Detekt configuration and the link above makes that work for me. And Thierry, that link allow you to do that. It's far from ideal for sure but at least it works.
8 Views