I just noticed that detekt does not analyse source...
# detekt
j
I just noticed that detekt does not analyse sources in kotlin subdirectory of android variant (even with detektVariant2Debug task):
Copy code
src
├── variant1
│   └── java
│       └── files here are processed
├── main
│   └── java
│       └── files here are processed
└── variant2
    └── kotlin
        └── files here are ignored
If I rename sources directory to java it reports issues in those files. I'm not specifying any custom source directories in my build scripts. Does detekt use only java sources instead of kotlin sources? AGP sourceSets task reports java subdir in java sources and both in kotlin sources:
Copy code
Java sources: [module1\src\variant2Debug\java]
Kotlin sources: [module1\src\variant2Debug\kotlin, module1\src\variant2Debug\java]
b
How are you running detekt? gradle? If so, which task do you use?
j
tried both detekt and detektVariant2Debug
b
That seems like a bug
Could you open an issue?
j
might be something with AGP changes - I've noticed it on 7.0.4 and just updated to 7.1.0
b
It shouldn't but maybe. We should support those two.
j
I'll check if it happens on new minimal project and report a bug if so
❤️ 2
g
That would be gold ☝️