• GurpreetSK

    GurpreetSK

    2 years ago
    Hey! Is it possible to run detekt only on a given set of files? (something like 
    ./gradlew detekt {list of files}
    ) Context: I want to write a git hook which runs detekt on all the changed files (only the changed files) and fail if the task fails.
    GurpreetSK
    d
    +2
    8 replies
    Copy to Clipboard
  • Gopal S Akshintala

    Gopal S Akshintala

    2 years ago
    Hi! is it possible to get McCabe complexity (mcc) break-up per file/class?
    Gopal S Akshintala
    a
    2 replies
    Copy to Clipboard
  • a

    Artur Bosch

    2 years ago
    Edit: repository is still located at arturbosch/detekt and the website at https://arturbosch.github.io/detekt. It is currently not possible to move the repo to the detekt organization as we generate our documentation from the source code and GitHub pages requires us to open a new repo for the url detekt.github.io.
    a
    gammax
    5 replies
    Copy to Clipboard
  • a

    Artur Bosch

    2 years ago
    @Gopal S Akshintala By default sonarqube uses the SonarKotlin profile (Sonar way) without the detekt rules. Have you modified the quality profile or created a new one containing the detekt rules? How many rules do you see in the Rules tab?
    a
    Gopal S Akshintala
    2 replies
    Copy to Clipboard
  • f

    fo2rist

    2 years ago
    Can anyone help with configuring console reports? I want to only have the summary (number of issues found) at both success and failures. But when I exclude all processors and reporters I still have all individual issues logged into console Part of config:
    processors:
      active: true
      exclude:
       - 'DetektProgressListener'
       - 'FunctionCountProcessor'
       - 'PropertyCountProcessor'
       - 'ClassCountProcessor'
       - 'PackageCountProcessor'
       - 'KtFileCountProcessor'
    
    console-reports:
      active: true
      exclude:
        - 'ProjectStatisticsReport'
        - 'ComplexityReport'
        - 'FindingsReport'
        - 'NotificationReport'
        - 'BuildFailureReport'
    Example of output:
    f
    a
    4 replies
    Copy to Clipboard
  • t

    Thiago Nerys

    2 years ago
    I'm having a hard time trying to make detekt 1.7.0+ work with Spring and java 11. If I go to java 8, it works. If I go to 1.6.0, it works. If I use java 11 and detekt 1.7.0+, sometimes it doesn't load
    java.sql.Date
    , sometimes it can't find
    org.yaml.snakeyaml.nodes.Tag
    . Attached the smallest
    build.gradle.kts
    that I was able to reproduce the problem. Just add an empty .kt file under
    src/main/kotlin
    and you'll see the error. Running gradle 6.3
    t
    b
    +1
    6 replies
    Copy to Clipboard
  • d

    dead.fish

    2 years ago
    FYI - the top Github link at https://detekt.github.io/detekt/# still links to
    arturbosch/detekt
    d
    1 replies
    Copy to Clipboard
  • d

    dead.fish

    2 years ago
    I have the suspicion that
    detektMain
    cannot run flawless with
    org.gradle.parallel=true
    on many modules at once. I get weird class not found exceptions on runtime (with 1.8) that I don't get with the old (legacy)
    detekt
    task. Has anybody experienced something like this?
    d
    2 replies
    Copy to Clipboard
  • sanogueralorenzo

    sanogueralorenzo

    2 years ago
    Hello everyone, I switched to
    buildUponDefaultConfig = true
    recently and realised that overriden functions also show as
    EmptyFunctionBlock
    (I know there is a flag to ignoreOverriden) I'm more curious to know what was the reasoning behind leaving it to false and what is the best approach to solve situations where you are implementing an interface from the framework or third party provider that you have no control over.
    sanogueralorenzo
    b
    2 replies
    Copy to Clipboard
  • Jukka Siivonen

    Jukka Siivonen

    2 years ago
    So after updating IDEA plugin I get LongParameterList error for many of my non data type constructors, is this intended behavior? I would expect to get this error only for function parameters
    Jukka Siivonen
    b
    +1
    12 replies
    Copy to Clipboard