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

Emil Kantis

03/17/2023, 7:47 AM
I'm trying to get
IgnoredReturnValue
to flag all cases of discarded returns. Is this config correct? I can't seem to get it to work.. (Other rules configured in the same file are working)
Copy code
potential-bugs:
   IgnoredReturnValue:
      active: true
      restrictToConfig: false
      returnValueTypes:
         - '*'
g

gammax

03/17/2023, 11:03 AM
Are you using Type Resolution?
e

Emil Kantis

03/17/2023, 11:25 AM
Apparently not, I'm just using the
detekt
task from the gradle plugin 🙂
g

gammax

03/17/2023, 11:30 AM
yeah I believe
IgnoredReturnValue
needs TR to work
e

Emil Kantis

03/17/2023, 11:32 AM
what's the best way to get
./gradlew check
to run detekt with TR?
If you have anything cooked up already 🙂
b

Brais Gabin

03/19/2023, 11:57 AM
You should make check to depend on
detektMain
and
detektTest
. And probably remove the dependency with the no type resolution one:
detekt
14 Views