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

spand

03/18/2021, 10:31 AM
I am having trouble getting
NullableToStringCall
rule to work. This is a new setup but I have done the following steps: 1. Setup detekt in gradle 2. Run generateDetektConfig task and edited the config to: 3. Set all rulesets to active false except
potentialbugs
4. Set all rules to active: false in the ruleset except
IteratorNotThrowingNoSuchElementException
and
NullableToStringCall
. Both are true 5. In the same file I have the example noncompliant code for
NullableToStringCall
and a noncompliant code for
IteratorNotThrowingNoSuchElementException
. 6. Only the
IteratorNotThrowingNoSuchElementException
code will fail the task. Any ideas of what I am doing wrong ? The only difference between the rules I can see is that
NullableToStringCall
is off by default.
b

Brais Gabin

03/18/2021, 11:16 AM
Did you enabled type solving?
s

spand

03/18/2021, 11:29 AM
I ran the
detekt
task so it would seem from the docs that I had not. I will give it a go with
detektMain
That did it. Thanks !
b

Brais Gabin

03/18/2021, 11:31 AM
your welcome!
21 Views