How can I exclude/filter specific MagicNumber issues in detekt.yml #3283
Replies: 2 comments 4 replies
-
Do those file names follow a regular expression? You could add to the Usually I would say that other option is to create a copy of the rule and adapt it to your needs... But the use of compose is going to grow a lot so we should think about this. Disable the rule if it's used with an extension function? Create a script-configuration so the users can code when they want to ignore an issue to give maximum flexibility? Is this even possible? |
Beta Was this translation helpful? Give feedback.
-
I think this could be fixed by upgrading our code where we just check if
|
Beta Was this translation helpful? Give feedback.
-
I am using Jetbrain's Compose for Desktop and the code structure there is a little bit odd and unconventional.
Given the following snippet:
Detekt spits out a MagicNumber issue. I understand the problem - however I have no other way than going "magical" here.
I read in the
detekt.yml
. that there are some options to customize the behaviour.This is my configuration therefore:
I found that
ignoreNamedArgument = true
might help but it does not work on the following:So my question is how can I exclude the above numbers arguments that are plenty in my codebase?
(First Discussion Question 🥳 )
Beta Was this translation helpful? Give feedback.
All reactions