Heeey! Is there any way to check if the `println` ...
# konsist
r
Heeey! Is there any way to check if the
println
method was used in the project?
a
Can use detekt rule for this if the project is already using detekt. https://detekt.dev/docs/rules/style/#forbiddenmethodcall
d
As for Konsist you could check the use of an import, it is a bit blunt and might not catch all cases though
p
If you just want to check for the standard Kotlin
println
- function you can use below check:
Copy code
Konsist.scopeFromProduction()
            .files
            .assertFalse {
                it.text.contains(Regex("println\\(\".*\"\\)"))
            }
r
the regex one works like a charm kodee happy
❤️ 1
thanks!