syft
syft copied to clipboard
Add Indent Option to Output Formats
Description
It would be nice if the syft package allowed for pretty printing SBOMs with custom indenting. The default for most formats is only 1 space, but I personally use a tab.
This change is in the works, but I wanted to bring attention to it because I have a few issues.
- the cyclone formats use a separate encoder package, that do not allow setting the indent
- I can make a PR and do the changes to that package, but it would require a bit more coordination.
- Some formats do not have a
Prettyoption.- I can add an Indent option, but I feel like I should add a Pretty option while I'm at it. Unless there is a reason they do not have a Pretty option
- But adding an Indent option without a Pretty option feels wrong for some reason
Type of change
- [ ] New feature (non-breaking change which adds functionality)
Checklist:
- [ ] I have added unit tests that cover changed behavior
- [ ] I have tested my code in common scenarios and confirmed there are no regressions
- [ ] I have added comments to my code, particularly in hard-to-understand sections