interlynk-io / sbomex

Find & pull public SBOMs

Home Page:https://sbombenchmark.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid spec/format values have usability issues

surendrapathak opened this issue · comments

The error message is always "invalid spec." It should be called out specifically.

Error messages:

  1. spec options are spdx or cdx
  2. format options are xml , json or tv (for tag-value)

Screenshot 2023-03-09 at 10 40 18 PM

Example of better error handling below -

  1. Shows the error string
  2. Prints help message
sbomqs score ~/Downloads/09-07-2022.csv --reportFormat basic2
Error: report format options are basic or detailed
Usage:
  sbomqs score [flags]

Flags:
      --category string       scoring category
      --dirpath string        sbom dir path
      --filepath string       sbom file path
  -h, --help                  help for score
      --reportFormat string   reporting format basic/detailed/json