]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
scripts/patchreview: Make json output human parsable
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 May 2022 12:42:28 +0000 (13:42 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 May 2022 13:00:26 +0000 (14:00 +0100)
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 <richard.purdie@linuxfoundation.org>
scripts/contrib/patchreview.py

index 002991c559cfa7e666db0ef5d2ba01fb32740c05..85d2169ad131c38d18403cd80f4da5edce49518c 100755 (executable)
@@ -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()