Skip to content

error in output-reports config #2891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
schalkms opened this issue Jul 24, 2020 · 1 comment · Fixed by #2907
Closed

error in output-reports config #2891

schalkms opened this issue Jul 24, 2020 · 1 comment · Fixed by #2907

Comments

@schalkms
Copy link
Member

using detekt 1.10 ( id("io.gitlab.arturbosch.detekt").version("1.10.0")), and including the config stanza:

output-reports:
  active: true
  exclude:
  #  - 'HtmlOutputReport'
  #  - 'TxtOutputReport'
  #  - 'XmlOutputReport'

I get the following error:

$ ./gradlew detekt

> Task :jobs:detekt FAILED
Property 'output-reports' is misspelled or does not exist.

FAILURE: Build failed with an exception.

Also, the documentation shows this configuration is available, but the default config file linked from the documentation does not have it.

Finally, running without this stanza commented yields empty xml reports:

$ cat lib/build/reports/detekt/detekt.html
...
<h2>Complexity Report</h2>

<div>
  <ul>
    <li>224 lines of code (loc)</li>
    <li>169 source lines of code (sloc)</li>
    <li>130 logical lines of code (lloc)</li>
    <li>23 comment lines of code (cloc)</li>
    <li>32 cyclomatic complexity (mcc)</li>
    <li>9 cognitive complexity</li>
    <li>0 number of total code smells</li>
    <li>13% comment source ratio</li>
    <li>246 mcc per 1,000 lloc</li>
    <li>0 code smells per 1,000 lloc</li>
  </ul>
</div>

$ cat lib/build/reports/detekt/detekt.xml
<?xml version="1.0" encoding="utf-8"?>
<checkstyle version="4.3">
</checkstyle

Originally posted by @sean-abbott in #2869 (comment)

@sean-abbott
Copy link

detekt.yml.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants