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

Introduce and use ScanSummary.EMPTY #5937

Merged
merged 7 commits into from
Oct 12, 2022
Merged

Introduce and use ScanSummary.EMPTY #5937

merged 7 commits into from
Oct 12, 2022

Conversation

fviernau
Copy link
Member

This eliminates repetition of default values in scan summary constructions.
It prepares for further refactoring steps.

Part of #5681.

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Base: 57.95% // Head: 57.95% // No change to project coverage 👍

Coverage data is based on head (1324d49) compared to base (1324d49).
Patch has no changes to coverable lines.

❗ Current head 1324d49 differs from pull request most recent head 9b63690. Consider uploading reports for the commit 9b63690 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5937   +/-   ##
=========================================
  Coverage     57.95%   57.95%           
  Complexity     2057     2057           
=========================================
  Files           322      322           
  Lines         18666    18666           
  Branches       3759     3759           
=========================================
  Hits          10817    10817           
  Misses         6802     6802           
  Partials       1047     1047           
Flag Coverage Δ
funTest-analyzer-docker 74.87% <0.00%> (ø)
funTest-non-analyzer 50.42% <0.00%> (ø)
test 27.60% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fviernau fviernau force-pushed the scan-summary-empty-copy branch 3 times, most recently from ab423c4 to 17aae9d Compare October 12, 2022 10:27
@fviernau fviernau marked this pull request as ready for review October 12, 2022 10:31
@fviernau fviernau requested a review from a team as a code owner October 12, 2022 10:31
The constant can be used with the `copy` function to conveniently
create an instance with only some values set.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Slightly simplify an upcoming change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Improve readability of the caller code.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Use named arguments, inline a variable to end up with an expression
function.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The test does cover the values used for these times. So, use
`Instant.EPOCH` for making the value deterministic, for aligning with
other "empty" default values. While at it also inline the variable to
simplify an upcoming change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Eliminate repeating default values by removing constructor calls in
favor of using `ScanSummary.EMPTY.copy()`.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau merged commit c7bce54 into main Oct 12, 2022
@fviernau fviernau deleted the scan-summary-empty-copy branch October 12, 2022 13:48
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.

2 participants