Xml Report Merger now merges duplicate smells across input report files#5033
Conversation
| } | ||
|
|
||
| /** A list of checkstyle xml files written by Detekt */ | ||
| private class DetektCheckstyleReports(private val files: Collection<File>) { |
There was a problem hiding this comment.
Using classes here to help call out preconditons and assumptions about the input data. These functions started out as extension functions, but I didn't like the idea of applying something so specific to broad types such as Colleciton<File> and List<Node>Thoughs?
There was a problem hiding this comment.
I don't have strong opinions, so I would just conform to the pattern in this file (Wrapping inside a class seems to be the pattern)
Codecov Report
@@ Coverage Diff @@
## main #5033 +/- ##
===========================================
+ Coverage 0 84.86% +84.86%
- Complexity 0 3555 +3555
===========================================
Files 0 500 +500
Lines 0 11753 +11753
Branches 0 2189 +2189
===========================================
+ Hits 0 9974 +9974
- Misses 0 692 +692
- Partials 0 1087 +1087
Continue to review full report at Codecov.
|
|
Build failure is Comparing the differences between the expected/actual reports, the difference I found was on the last line of the MD report: generated with [detekt version 1.21.0-RC2](https://detekt.dev/) on 2022-07-03 15:04:34 UTCvs generated with [detekt version 1.21.0-RC2](https://detekt.dev/) on 2022-07-03 15:04:35 UTCThe difference is time? Is this a known flake? |
Pushed a commit mocking the time for more consistent MarkdownReportSpec results |
53d0a92 to
ce2cf3d
Compare
Thanks for spotting this. Nope it was not known, but as the Markdown report was introduced recently, this was most likely the root cause. |
| * <file> | ||
| * <error> | ||
| * </file> |
There was a problem hiding this comment.
:+100: on this documentation
| } | ||
|
|
||
| /** A list of checkstyle xml files written by Detekt */ | ||
| private class DetektCheckstyleReports(private val files: Collection<File>) { |
There was a problem hiding this comment.
I don't have strong opinions, so I would just conform to the pattern in this file (Wrapping inside a class seems to be the pattern)
…kt/report/XmlReportMerger.kt
Xml Report Merger can now merge duplicate smells across multiple input report files. This is useful especially in Android, where running Detekt on multiple flavors identities many of the same errors on different flavors. Also cuts down on the amount of noise when these reports are submitted to Sonar.
I tried to make this as readable as possible, even though this process is complicated. Let me know if there is anything to improve on.