From a61e3c4b856a439b3303e284049cf4c2b73ccb35 Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Mon, 7 Mar 2016 12:26:33 -0800 Subject: [PATCH] Update command line help baseline report The command line help for the baseline parameter is misleading. The passed output has to be JSON, but the output formatters for the result are different for baseline (another command line option). Change-Id: I1f6d760af96b48472027dba94e585872768103c8 Closes-Bug: #1534358 --- README.rst | 5 ++--- bandit/cli/main.py | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 3094e804..566192af 100644 --- a/README.rst +++ b/README.rst @@ -126,9 +126,8 @@ Usage:: Note that these are in addition to the excluded paths provided in the config file. -b BASELINE, --baseline BASELINE - Path to a baseline report, in JSON format. Note: - baseline reports must be output in one of the - following formats: ['html', 'json', 'screen', 'txt'] + Path to a baseline report. Only JSON formatted files + are accepted. --ini INI_PATH Path to a .bandit file which supplies command line arguments to Bandit. --version show program's version number and exit diff --git a/bandit/cli/main.py b/bandit/cli/main.py index 9d1b9331..427a745c 100644 --- a/bandit/cli/main.py +++ b/bandit/cli/main.py @@ -232,10 +232,8 @@ def main(): ) parser.add_argument( '-b', '--baseline', dest='baseline', action='store', - default=None, help=('Path to a baseline report, in JSON format. ' - 'Note: baseline reports must be output in one of ' - 'the following formats: ' + - str(sorted(baseline_formatters))) + default=None, help=('Path to a baseline report. Only JSON formatted ' + 'files are accepted.') ) parser.add_argument( '--ini', dest='ini_path', action='store', default=None,