Thread
#detekt
    Janusz Chorko

    Janusz Chorko

    7 months ago
    I just noticed that detekt does not analyse sources in kotlin subdirectory of android variant (even with detektVariant2Debug task):
    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:
    Java sources: [module1\src\variant2Debug\java]
    Kotlin sources: [module1\src\variant2Debug\kotlin, module1\src\variant2Debug\java]
    b

    Brais Gabin

    7 months ago
    How are you running detekt? gradle? If so, which task do you use?
    Janusz Chorko

    Janusz Chorko

    7 months ago
    tried both detekt and detektVariant2Debug
    b

    Brais Gabin

    7 months ago
    That seems like a bug
    Could you open an issue?
    Janusz Chorko

    Janusz Chorko

    7 months ago
    might be something with AGP changes - I've noticed it on 7.0.4 and just updated to 7.1.0
    b

    Brais Gabin

    7 months ago
    It shouldn't but maybe. We should support those two.
    Janusz Chorko

    Janusz Chorko

    7 months ago
    I'll check if it happens on new minimal project and report a bug if so
    gammax

    gammax

    7 months ago
    That would be gold