Rearchitect to Object-Oriented Design #41
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #39
Fix #37
Fix #25
I know this is a large PR. :sigh: Hopefully you have a cup of coffee and also see why the design is more useful :)
The key changes are:
Again, I apologize for such a large PR. But I believe development velocity will be faster in the future if the codebase uses this object oriented approach. Example #1: The new print mode is easy to implement thanks to the object-oriented approach. In fact, I struggled to even think about how to implement this mode without the re-architecture.
Example of new print output mode:
Example of print output with
-v
verbose flag. I think this will be useful for the online SPDX tools web app.And the JSON output is slightly modified so that the
componentNames
data fields are the same as the other component data fields (this change was also easy due to the new re-architecture):Also, bonus: I found and squashed a bug. The
nonconformantComponents
list data structures were not storing the package name as intended. They now do store the package names.