Skip to content
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

Add HTML reporting #299

Open
wants to merge 10 commits into
base: trunk
Choose a base branch
from
Open

Conversation

jzbrooks
Copy link

@jzbrooks jzbrooks commented Sep 7, 2024

This is a relatively quick step forward for HTML reports, which would be useful for some reporting I'd like to add to our CI pipeline.

  • Styles
  • Remaining Formats
  • Tests (jsoup dom scraping?)

(Eventually) Resolves #83

if (diff.added.isNotEmpty()) {
br()
diff.added.forEach {
span { unsafe { raw("+ $it".htmlEncoded) } }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kinda lame. kotlinx.html appears to encode some special chars, but not Δ or →.

It would probably be an improvement to somehow avoid using → in the CF entity toString implementation, but it's not a huge deal (other than allocating every string again…)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing → with -> would also obviate the need for this. It's easy to replace Δ based on the output type because it's written in :reports not in a Method.toString in :formats.

It's maybe a formatting landmine to not have a generic htmlEncoding mechanism.

@jzbrooks jzbrooks marked this pull request as ready for review September 12, 2024 02:37
@jzbrooks
Copy link
Author

Here's a PDF export for ref
dex-diff-report.pdf

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

Successfully merging this pull request may close these issues.

Support HTML reports
1 participant