Skip to content
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

Document Console and Output Reports #2869

Closed
schalkms opened this issue Jul 13, 2020 · 4 comments
Closed

Document Console and Output Reports #2869

schalkms opened this issue Jul 13, 2020 · 4 comments

Comments

@schalkms
Copy link
Member

This should be documented on the following web page and in the source code.
https://detekt.github.io/detekt/configurations.html#console-and-output-reports

Successor of #2833

@sean-abbott
Copy link

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

@schalkms
Copy link
Member Author

@sean-abbott I moved your comment to a new issue.

@sean-abbott
Copy link

Thank you, sorry for misfiling...I'm new to detekt so I wasn't sure if this was user error or not.

@schalkms
Copy link
Member Author

No worries..
This is issue here is rather a reminder to update the docs accordingly. May I ask you to submit your complete config in the other issue.

schalkms added a commit that referenced this issue Jul 31, 2020
schalkms added a commit that referenced this issue Jul 31, 2020
schalkms added a commit that referenced this issue Jul 31, 2020
@arturbosch arturbosch added this to the 1.10.1 milestone Aug 1, 2020
schalkms added a commit that referenced this issue Aug 8, 2020
schalkms added a commit that referenced this issue Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants