https://kotlinlang.org logo
#detekt
Title
# detekt
f

fo2rist

04/13/2020, 6:09 PM
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:
Copy code
processors:
  active: true
  exclude:
   - 'DetektProgressListener'
   - 'FunctionCountProcessor'
   - 'PropertyCountProcessor'
   - 'ClassCountProcessor'
   - 'PackageCountProcessor'
   - 'KtFileCountProcessor'

console-reports:
  active: true
  exclude:
    - 'ProjectStatisticsReport'
    - 'ComplexityReport'
    - 'FindingsReport'
    - 'NotificationReport'
    - 'BuildFailureReport'
Example of output:
a

Artur Bosch

04/13/2020, 7:41 PM
There is an additional console report which you may want to consider
FileBasedFindingsReport
. I don't quite know what you mean with "only the summary (number of issues found)". Maybe you just want the
BuildFailureReport
and inspect the html or xml reports ?
f

fo2rist

04/13/2020, 7:49 PM
There is an additional console report which you may want to consider
Thanks, will check.
I don't quite know what you mean with "only the summary
With previous version of Detekt I used to see something like
Build succeeded with 28 weighted issues (threshold defined was 48).
on success, but now it's gone I only see
Build failed with 48 weighted issues (threshold defined was 48)
on failures. Is it possible to get this message back for success?
a

Artur Bosch

04/14/2020, 12:19 PM
Unfortunately not without writing a custom
ConsoleReport
. We have removed this message together with the
BuildFailureReport
. Another way would be to implement a custom Gradle tasks and count the detekt issues in the xml report.
f

fo2rist

04/14/2020, 5:17 PM
Got it. Thanks, Artur!
3 Views