From 6a3f206d950432c5af364704e2b718889f4df8d5 Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Tue, 23 Jul 2019 16:46:42 -0700 Subject: [PATCH] :performing_arts: Indent and sort `audit --display-results` output --- detect_secrets/core/audit.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/detect_secrets/core/audit.py b/detect_secrets/core/audit.py index f36d0c22e..917ede8f0 100644 --- a/detect_secrets/core/audit.py +++ b/detect_secrets/core/audit.py @@ -269,7 +269,16 @@ def print_audit_results(baseline_filename): print('Failed to retrieve baseline from {filename}'.format(filename=baseline_filename)) return - print(json.dumps(determine_audit_results(baseline, baseline_filename))) + print( + json.dumps( + determine_audit_results( + baseline, + baseline_filename, + ), + indent=2, + sort_keys=True, + ), + ) def _get_baseline_from_file(filename): # pragma: no cover