Hi Folks, I can see some issues are reported when ...
# detekt
a
Hi Folks, I can see some issues are reported when I run detekt for the first time. But, subsequent times, the issues are skipped. It looks to be due to some caching. Can anyone please help share how to solve this 🙏?
Copy code
abhimanyu@M2-Mac-mini android % ./gradlew detektMain
Reusing configuration cache.

> Task :core:common:compileReleaseKotlin
w: file:///Users/abhimanyu/Documents/projects/finance-manager/codebase/android/core/common/src/main/java/com/makeappssimple/abhimanyu/financemanager/android/core/common/extensions/IntExtension.kt:9:5 Unreachable code

> Task :core:common:compileDebugKotlin
w: file:///Users/abhimanyu/Documents/projects/finance-manager/codebase/android/core/common/src/main/java/com/makeappssimple/abhimanyu/financemanager/android/core/common/extensions/IntExtension.kt:9:5 Unreachable code

BUILD SUCCESSFUL in 5s
791 actionable tasks: 76 executed, 715 up-to-date
Configuration cache entry reused.
abhimanyu@M2-Mac-mini android % ./gradlew detektMain
Reusing configuration cache.

BUILD SUCCESSFUL in 643ms
791 actionable tasks: 29 executed, 762 up-to-date
Configuration cache entry reused.
abhimanyu@M2-Mac-mini android % ./gradlew detektMain --no-cache
Calculating task graph as no cached configuration is available for tasks: detektMain --no-cache

FAILURE: Build failed with an exception.

* What went wrong:
Problem configuring task :app:detektMain from command line.
> Unknown command-line option '--no-cache'.

* Try:
> Run gradlew help --task :app:detektMain to get task usage details.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.

BUILD FAILED in 1s
Configuration cache entry stored.
abhimanyu@M2-Mac-mini android % ./gradlew detektMain --no-build-cache
Reusing configuration cache.

BUILD SUCCESSFUL in 552ms
791 actionable tasks: 29 executed, 762 up-to-date
Configuration cache entry reused.
n
Unreachable code
looks like a warning unrelated to detekt
👍 1