Adding directory coverage thus supporting the Treemap widget #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again,
thats the 2nd in a series of 3 pull request I tried to separate functionality a bit.
This one is the reason that I actually started to work on the code (-:
I noticed that the Treemap widget is not working correctly with Statementcoverage. Reason is that the directories do not have StatementCoverage values.
The treemap widgets cannot be traveresed from project -> module -> directory -> file if the directory does not provide the same statistics as the other levels. I changed the code to collect data for directories as well.
There are two options
either summing up all values (B) or using only direct children (A):
If all directories with values are represented on one treemap level (as SonarQube does) the result of A is a treemap that shows for each directory the "quality of its children" which I think is correct. If grandchildren would be added (option B) you could easily have a green directory with red files inside (if the sub directories are big enough)...
The Pull Request implements approach A. Hope that fits into the plugin.
Remarks:
but additional tests would surely be a good idea
Best Michael