From 6d79817e3b7382e57dc3d4346e2433fb36c85359 Mon Sep 17 00:00:00 2001 From: Arnaud J Le Hors Date: Mon, 9 May 2022 16:23:13 +0200 Subject: [PATCH] :book: Fix command Usage (#1814) This changes the cmd Usage text to accurately represents the supported syntax: Usage: ./scorecard (--repo= | --local= | --{npm,pypi,rubygems}=) [--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 --- cmd/root.go | 3 +-- options/flags.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 97ff141705d..2f9a2df2c07 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -37,8 +37,7 @@ import ( const ( scorecardLong = "A program that shows security scorecard for an open source software." - scorecardUse = `./scorecard [--repo=] [--local=folder] [--checks=check1,...] - [--show-details] or ./scorecard --{npm,pypi,rubygems}= + scorecardUse = `./scorecard (--repo= | --local= | --{npm,pypi,rubygems}=) [--checks=check1,...] [--show-details]` scorecardShort = "Security Scorecards" ) diff --git a/options/flags.go b/options/flags.go index 7b17ce06618..a007b274a6c 100644 --- a/options/flags.go +++ b/options/flags.go @@ -73,7 +73,7 @@ func (o *Options) AddFlags(cmd *cobra.Command) { &o.Repo, FlagRepo, o.Repo, - "repository to check", + "repository to check (valid inputs: \"owner/repo\", \"github.com/owner/repo\", \"https://github.com/repo\")", ) cmd.Flags().StringVar(