leodido / go-urn

Parser for uniform resource names as seen on RFC 8141, RFC 2141, and RFC 7643
MIT License
87 stars 11 forks source link

fix(tools): rewrite removecomments from scratch #31

Closed tnyeanderson closed 1 year ago

tnyeanderson commented 1 year ago

Currently, removecomments uses the Go.Sed library which is GPLv3, forcing removecomments to also be GPLv3. This can cause FOSSA to falsely identify "compliance issues" when this package is imported.

This is a complete rewrite from scratch to try to replicate the functionality in the current script, which is to remove specific comment lines (lines containing //line). I assume these are used for debugging by the maintainer.

This rewrite includes unit tests, and has been hand-tested to work with the machine.go file targeted in the makefile. However, I don't claim to understand the maintainer's workflow, so I encourage a quick test to make sure it is working as expected before merging.

I appreciate your hard work on this project... thank you!

tnyeanderson commented 1 year ago

Should be good to merge now, had to do some final cleanup and make sure the errors cascade properly.