📖 Fix command Usage (#1814)

This changes the cmd Usage text to accurately represents the
supported syntax:

Usage:
  ./scorecard (--repo=<repo> | --local=<folder> | --{npm,pypi,rubygems}=<package_name>)
	 [--checks=check1,...] [--show-details] [flags]
...
      --repo string        repository to check (valid inputs: "owner/repo", "github.com/owner/repo", "https://github.com/owner/repo")
...

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
This commit is contained in:
Arnaud J Le Hors 2022-05-09 16:23:13 +02:00 committed by GitHub
parent 815de1819f
commit 6d79817e3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -37,8 +37,7 @@ import (
const ( const (
scorecardLong = "A program that shows security scorecard for an open source software." scorecardLong = "A program that shows security scorecard for an open source software."
scorecardUse = `./scorecard [--repo=<repo_url>] [--local=folder] [--checks=check1,...] scorecardUse = `./scorecard (--repo=<repo> | --local=<folder> | --{npm,pypi,rubygems}=<package_name>)
[--show-details] or ./scorecard --{npm,pypi,rubygems}=<package_name>
[--checks=check1,...] [--show-details]` [--checks=check1,...] [--show-details]`
scorecardShort = "Security Scorecards" scorecardShort = "Security Scorecards"
) )

View File

@ -73,7 +73,7 @@ func (o *Options) AddFlags(cmd *cobra.Command) {
&o.Repo, &o.Repo,
FlagRepo, FlagRepo,
o.Repo, o.Repo,
"repository to check", "repository to check (valid inputs: \"owner/repo\", \"github.com/owner/repo\", \"https://github.com/repo\")",
) )
cmd.Flags().StringVar( cmd.Flags().StringVar(