Page MenuHomeDevCentral

Handle incomplete reports
ClosedPublic

Authored by DorianWinty on Feb 18 2022, 22:27.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 04:56
Unknown Object (File)
Fri, Dec 20, 04:56
Unknown Object (File)
Sat, Dec 14, 07:31
Unknown Object (File)
Fri, Dec 13, 20:58
Unknown Object (File)
Thu, Dec 12, 22:49
Unknown Object (File)
Thu, Dec 12, 22:49
Unknown Object (File)
Thu, Dec 12, 16:32
Unknown Object (File)
Thu, Dec 12, 10:31
Subscribers
None

Details

Summary

Format correctly empty or partial reports.

Test Plan

Unit tests from D2537 pass.

Diff Detail

Repository
rKREPORT Keruald Report
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

DorianWinty created this revision.
DorianWinty retitled this revision from Test incomplete reports to complete test reports.Feb 18 2022, 22:29
DorianWinty edited reviewers, added: dereckson; removed: DorianWinty.
dereckson requested changes to this revision.Feb 19 2022, 09:16
dereckson added inline comments.
src/Output/HTMLOutput.php
68

That's actually the explicit title of the report:

yield ["empty", new Report("Void report")];
src/Output/MarkdownOutput.php
15–16

In Markdown, we don't do print anything before or after the foreach loop content.

So this if isn't needed: if there isn't any section, the content of foreach won't be executed.

src/Output/XMLOutput.php
25–26

Same than for Markdown: this loop prints each time a section tag:

<section>
...
</section>

So if we skip the if, it will still work as we don't print anything before or after.

tests/Output/XMLOutputTest.php
26 ↗(On Diff #6404)

Should be fixed in D2537.

tests/data/empty.xml
2 ↗(On Diff #6404)

Amend D2537 with that one too.

This revision now requires changes to proceed.Feb 19 2022, 09:16
DorianWinty marked 3 inline comments as done.

modify with comments

This comment was removed by DorianWinty.
dereckson retitled this revision from complete test reports to Handle incomplete reports.Feb 21 2022, 22:54
dereckson edited the summary of this revision. (Show Details)
dereckson edited the test plan for this revision. (Show Details)
dereckson requested changes to this revision.Feb 21 2022, 22:56
dereckson added inline comments.
src/Output/XMLOutput.php
66

Aooouuu?

Still a harccoded title here.

This revision now requires changes to proceed.Feb 21 2022, 22:56

removing the else statement
because we never pass on the statment and on void case

This revision is now accepted and ready to land.Feb 22 2022, 17:11
This revision was automatically updated to reflect the committed changes.