Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Show total count of issues found #19

Closed
xrigau opened this issue Jan 31, 2017 · 6 comments
Closed

Show total count of issues found #19

xrigau opened this issue Jan 31, 2017 · 6 comments

Comments

@xrigau
Copy link

xrigau commented Jan 31, 2017

Every time I go on a boyscout mission and fix some static analysis issues I end up with the number of issues for each analysis type, but I have to configure a threshold for the total number of issues:

> Checkstyle rule violations were found (58 errors, 43 warnings). See the reports at:
- file:///Users/xrigau/development/git/novoda/some-cool-project/app/build/reports/checkstyle/main.html
> Findbugs rule violations were found (9 errors, 6 warnings). See the reports at:
- file:///Users/xrigau/development/git/novoda/some-cool-project/app/build/reports/findbugs/coolprojectStaging.html
> PMD rule violations were found (11 errors, 13 warnings). See the reports at:
- file:///Users/xrigau/development/git/novoda/some-cool-project/app/build/reports/pmd/main.html

It'd be a lot easier if it printed a line such as:

Total: 78 errors, 62 warnings

So that I can update the thresholds after every boyscoutting more easily.

This wouldn't be needed if #18 was implemented

@mr-archano
Copy link
Contributor

mr-archano commented Jan 31, 2017

This can be easily added independently from #18. Let's do it 👍

@tasomaniac
Copy link
Contributor

Regarding this, I was also thinking about merging results across sub-projects in a big Gradle project.
Imagine a project with many modules, when a tool fails the build, it is hard to detekt which module it is. And reports are separated since they run individually on all projects.

Also in such scenario, maxErrors does not make much sense individually for each submodule. It would only makes sense when maxErrors = 0 (simply because 0 x noOfModules = 0)

In past projects, I did the following to merge unitTest results. This is something provided by Gradle. I couldn't find an easy way to do the same for lint for example (i.e merging lint results from different modules)

Merging multiple unit test results:

  def testTasks = [...] // manual list of all test tasks

  task testReport(type: TestReport) {
    destinationDir = file("$buildDir/reports/allTests")
    reportOn { testTasks.collect { project.tasks.findByPath(it)*.binResultsDir } }
  }

@tasomaniac
Copy link
Contributor

@xrigau today is your lucky day

@xrigau
Copy link
Author

xrigau commented Dec 18, 2018

EXCITEMENT!

@tasomaniac
Copy link
Contributor

I thought you would have 0 warnings and error by now 🧌

@xrigau
Copy link
Author

xrigau commented Dec 18, 2018

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

No branches or pull requests

3 participants