Thread
#detekt
    b

    BorzdeG

    10 months ago
    Detekt swears in the Multiplatform project. At the same time, there are no such errors in IDEA. What to do about it?Detekt swears in the Multiplatform project. At the same time, there are no such errors in IDEA. What to do about it?https://github.com/itbasis/kochange/runs/4278481352?check_suite_focus=true#step:4:42
    gammax

    gammax

    10 months ago
    What do you mean with Swears?
    b

    BorzdeG

    10 months ago
    example:
    error: unresolved reference: Currency
    The problem seems to be that some of the classes are in commonMain when checking for jvmMain.
    Javier

    Javier

    10 months ago
    I haven't tried to run detekt tasks for specific source sets but I am using detekt in kmp projects with no issues
    but I just run gradlew detekt
    b

    BorzdeG

    10 months ago
    detekt
    in KMP does not check the source code - you can see this by adding an empty class, for example, to commonMain. You will not receive an EmptyClassBlock error
    Javier

    Javier

    10 months ago
    it does for me
    I even have it configured with GitHub code scanning
    but I don't run detektJvmMain, I just run detekt
    b

    BorzdeG

    10 months ago
    because you have prescribed this for all Detekt tasks:
    setSource(projectDir)
    include("**/*.kt")
    ...
    also, apparently you don’t have expect/actual in your project ...
    Javier

    Javier

    10 months ago
    I am using it in more projects
    with expect and actual too
    don't remember the default config I have tho, I did it long time ago hahah
    there are actual expect there
    gammax

    gammax

    10 months ago
    Just a small heads up: on KMP projects if you use a plain
    detetk
    you’re not using type resolution. You should use one of the other
    detektJvmMain
    and similar tasks to enable type resolution.