Skip to content

Commit

Permalink
Add more missing ini options
Browse files Browse the repository at this point in the history
Added the following missing ini options:

* msg-template - necessary if output is a parameter
* verbose
* ignore-nosec
* baseline

Related to PR #508

Signed-off-by: Eric Brown <browne@vmware.com>
  • Loading branch information
ericwb committed Sep 24, 2019
1 parent 9e32438 commit d94a3fd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bandit/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,21 @@ def main():
ini_options.get('format'),
'output format')

args.msg_template = _log_option_source(
args.msg_template,
ini_options.get('msg-template'),
'output message template')

args.output_file = _log_option_source(
args.output_file,
ini_options.get('output'),
'output file')

args.verbose = _log_option_source(
args.verbose,
ini_options.get('verbose'),
'output extra information')

args.debug = _log_option_source(
args.debug,
ini_options.get('debug'),
Expand All @@ -392,6 +402,16 @@ def main():
ini_options.get('quiet'),
'silent mode')

args.ignore_nosec = _log_option_source(
args.ignore_nosec,
ini_options.get('ignore-nosec'),
'do not skip lines with # nosec')

args.baseline = _log_option_source(
args.baseline,
ini_options.get('baseline'),
'path of a baseline report')

if not args.targets:
LOG.error("No targets found in CLI or ini files, exiting.")
sys.exit(2)
Expand Down

0 comments on commit d94a3fd

Please sign in to comment.