Thread
#detekt
    m

    mickele

    4 years ago
    is anyone having issues with RC8? did something changed when RC9 was released that could affect RC8?
    detektCheck
    is always crashing now, both locally and on CI. thread with more info
    ./gradlew detektCheck --stacktrace:
    > Task :detektCheck FAILED
    Was passed main parameter '--output' but no main parameter was defined in your arg class
    
    Usage: detekt [options]
      Options:
        --baseline, -b
          If a baseline xml file is passed in, only new code smells not in the 
          baseline are printed in the console.
        --config, -c
          Path to the config file (path/to/config.yml). Multiple configuration 
          files can be specified with ',' or ';' as separator.
        --config-resource, -cr
          Path to the config resource on detekt's classpath (path/to/config.yml).
        --create-baseline, -cb
          Treats current analysis findings as a smell baseline for future detekt 
          runs. 
          Default: false
        --debug
          Prints extra information about configurations and extensions.
          Default: false
        --disable-default-rulesets, -dd
          Disables default rule sets.
          Default: false
        --filters, -f
          Path filters defined through regex with separator ';' (".*test.*").
        --generate-config, -gc
          Export default config to default-detekt-config.yml.
          Default: false
        --help, -h
          Shows the usage.
      * --input, -i
          Input paths to analyze.
        --parallel
          Enables parallel compilation of source files. Should only be used if the 
          analyzing project has more than ~200 kotlin files.
          Default: false
        --plugins, -p
          Extra paths to plugin jars separated by ',' or ';'.
        --print-ast
          Prints the AST for given [input] file. Must be no directory.
          Default: false
        --report, -r
          Generates a report for given 'report-id' and stores it on given 'path'. 
          Entry should consist of: [report-id:path-to-store-report]+
        --run-rule
          Specify a rule by [RuleSet:Rule] pattern and run it on input.
    m

    mauin

    4 years ago
    Do you specify
    toolVersion
    in your
    detekt {}
    closure? If you don't then please do and set it to RC8.
    Alternatively update the Gradle Plugin to RC9. However I'd still recommend setting the
    toolVersion
    to the same version as the plugin
    m

    mickele

    4 years ago
    thanks, I’ll try
    working on RC9 update atm, but I need to fix this ASAP 🙂
    @mauin that fixed, thanks. btw, why is this required shouldn’t it use the same version as the plugin?
    m

    mauin

    4 years ago
    It should and we have changed that behavior starting in RC9. But up until RC8 detekt would just use the latest version of the CLI which could lead to these issues. Going forward the
    toolVersion
    should automatically match the version of the Plugin
    f

    fo2rist

    4 years ago
    @mauin can you please provide more instruction? I'm running into the same issue with RC8. The problem is that there is no
    toolVersion
    in RC8 as far as I can see This parameter of
    detekt{}
    is only working if I upgrade to RC9 Is there a way I can keep using RC8 without major config changes? UPD: tried RC9 but after the version change there is no
    detektCheck
    task anymore.
    a

    Artur Bosch

    4 years ago
    in RC8 its just called
    version
    , in RC9 its now called
    toolVersion
    as other static analysis tools call it sorry for the late response