-
Notifications
You must be signed in to change notification settings - Fork 310
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
Static HTML report model clean-ups #8606
Conversation
8d8849a
to
259845b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8606 +/- ##
=========================================
Coverage 67.97% 67.97%
Complexity 1005 1005
=========================================
Files 244 244
Lines 7844 7844
Branches 876 876
=========================================
Hits 5332 5332
Misses 2129 2129
Partials 383 383
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
Outdated
Show resolved
Hide resolved
plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
Outdated
Show resolved
Hide resolved
This is more consistent with ORT's code base, which usually does not use the term "model" as a class name suffix. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Also move the class into `ProjectTable` to allow for that shorter name. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Also move the class into `IssueTable` to allow for that shorter name. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Move all direct nested class of `ReportTable` to the top level for a better overview. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
This is only needed in the static HTML reporter. So, move it next to the other helper functions. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
259845b
to
12e74fd
Compare
The report is table-based and consists of multiple tables. The previous name made it sound like it would be a single table. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
12e74fd
to
be8df83
Compare
@@ -174,7 +174,7 @@ class StaticHtmlReporter : Reporter { | |||
return document.serialize().normalizeLineBreaks() | |||
} | |||
|
|||
private fun getRuleViolationSummaryString(ruleViolations: List<ResolvableViolation>): String { | |||
private fun getRuleViolationSummaryString(ruleViolations: List<TableReportViolation>): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also use plural "TablesReport..." to not have too many variants of the spelling, and to document that it belongs to the scope of TablesReport
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe just move these classes inside of TablesReport
and omit the prefix, similar to like you did for the Row
classes?
`ResolvableIssue` and `ResolvableRuleViolation` are the representations of issues and rule violations within the domain of the static HTML report model. So, use the name of the model as the prefix, instead of the "Resolvable" prefix which focuses too much on only one of its properties. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
This is a fix-up for 9c6b867. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
be8df83
to
704a86f
Compare
A couple of trivial refactors focusing on cleaning-up the model classes of the static HTML report.
Please see the individual commit messages.
Part of: #7921.