From: Richard Purdie Date: Mon, 23 May 2022 12:42:28 +0000 (+0100) Subject: scripts/patchreview: Make json output human parsable X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~4046 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bde2ecb203d8a1a29715c70ca3ded382982390cf;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git scripts/patchreview: Make json output human parsable Sort dict keys in the json output and use tab spacing. This means when commited into git, the diffs are human readable but it is more compact filesize than space indentation. Signed-off-by: Richard Purdie --- diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py index 002991c559c..85d2169ad13 100755 --- a/scripts/contrib/patchreview.py +++ b/scripts/contrib/patchreview.py @@ -232,7 +232,7 @@ if __name__ == "__main__": row['malformed-sob'] += 1 data.append(row) - json.dump(data, open(args.json, "w")) + json.dump(data, open(args.json, "w"), sort_keys=True, indent="\t") if args.histogram: print()