-
Notifications
You must be signed in to change notification settings - Fork 308
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
Sanitize creating an Identifier
from SPDX
#4771
Conversation
Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
…X name There is no strict need to deduplicate the SPDX name like this as only the SPDX ID needs to be unique. Also, the type and namespace can be retrieved from the PURL. Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
2a0c6df
to
46c4b9d
Compare
Adding |
* supported, replace them with dashes, too, for readability. | ||
*/ | ||
private fun String.sanitize(): String = | ||
replace(Regex("[: ]"), "-").replace(Regex("-{2,}"), "-") |
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.
While I agree that replacing spaces with dashes is a good idea, it will break a lot of curations and I'm not sure if readability is worth it.
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 don't believe there are many SpdxDocumentFile
-type curations for packages with spaces in their names around, but I agree we should be conservative still, and I've changed the implementation.
Together with the previous commit, this fixes #4744. Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
46c4b9d
to
0c043ce
Compare
@oss-review-toolkit/core-devs can we move forward with this? |
Please have a look at the individual commit messages for the details.