瀏覽代碼

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.

(From OE-Core rev: bde2ecb203d8a1a29715c70ca3ded382982390cf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie 3 年之前
父節點
當前提交
c9303648f8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/contrib/patchreview.py

+ 1 - 1
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()