-
Notifications
You must be signed in to change notification settings - Fork 315
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
chore(model): Minor package related fixes #9671
Conversation
e238a23
to
419f45d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9671 +/- ##
=========================================
Coverage 68.10% 68.10%
Complexity 1294 1294
=========================================
Files 249 249
Lines 8841 8841
Branches 922 922
=========================================
Hits 6021 6021
Misses 2432 2432
Partials 388 388
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
OrtResult.labels
in alphabetical order077a032
to
e377c4d
Compare
model/src/main/kotlin/Package.kt
Outdated
@@ -147,10 +147,8 @@ data class Package( | |||
val EMPTY = Package( | |||
id = Identifier.EMPTY, | |||
purl = "", | |||
authors = emptySet(), |
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.
Actually, I believe that by convention we should always set all arguments for any val EMPTY
. Because if ever a default value changes to something non-"empty", then you don't need to remember to adjust that parameter here as well.
Some places already do set all values despite their default values being empty / null (like OrtResult
), other's don't (like ScanSummary
). IMO we should align all of these to set all values.
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.
I've dropped the commit for now.
e377c4d
to
c3c999c
Compare
Make the serialization more deterministic. Signed-off-by: Frank Viernau <[email protected]>
Move the function to its only caller and reduce the visibility. Signed-off-by: Frank Viernau <[email protected]>
c3c999c
to
c71261b
Compare
See individual commits.
Context: #8725.