-
Notifications
You must be signed in to change notification settings - Fork 135
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
[issue_589] fix json parser: process fields that can be "NOASSERTION"… #590
Conversation
… or "NONE" correctly Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
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.
Good catch! :)
I have a small remark that I don't feel very strongly about.
"homepage, expected_homepage, download_location, expected_download_location, " | ||
"copyright_text, expected_copyright_text, originator, expected_originator, supplier, expected_supplier", | ||
[ | ||
( | ||
"http://ftp.gnu.org/gnu/glibc", | ||
"http://ftp.gnu.org/gnu/glibc", | ||
"NOASSERTION", | ||
SpdxNoAssertion(), | ||
"NONE", | ||
SpdxNone(), | ||
"Organization: ExampleCodeInspect (contact@example.com)", | ||
Actor(ActorType.ORGANIZATION, "ExampleCodeInspect", "contact@example.com"), | ||
"NOASSERTION", | ||
SpdxNoAssertion(), | ||
), | ||
( | ||
"NOASSERTION", | ||
SpdxNoAssertion(), | ||
"NONE", | ||
SpdxNone(), | ||
"Copyright 2008-2010 John Smith", | ||
"Copyright 2008-2010 John Smith", | ||
None, | ||
None, | ||
None, | ||
None, | ||
), | ||
( | ||
"NONE", | ||
SpdxNone(), | ||
"http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz", | ||
"http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz", | ||
"NOASSERTION", | ||
SpdxNoAssertion(), | ||
"NOASSERTION", | ||
SpdxNoAssertion(), | ||
"Person: Jane Doe (jane.doe@example.com)", | ||
Actor(ActorType.PERSON, "Jane Doe", "jane.doe@example.com"), |
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.
This is kind of hard to comprehend due to the scrambling of normal, none and no assertion cases. I get that this might make the test cases more diverse, but I don't think it is really worth it compared to just having test cases where all values are normal values or None/NONE etc.
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.
Yes, my intention was to make the test cases more diverse. I think both options doesn't really make a difference and as they are also just test cases I would stick to the current implementation and merge it like that.
… or "NONE" correctly
The issue is only related to the homepage field, while working on the fix, I noticed that the issue also applies to other fields.
fixes #589