mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 17:47:59 -06:00
Fix indentation in DistributionInfo.json (#12838)
* Fix indentation in DistributionInfo.json Replace (accidental) tabs by spaces * Add a json formatting check to the validate.py script This should a coherent formatting for the future
This commit is contained in:
parent
345816f03d
commit
420b7b22db
@ -146,8 +146,8 @@
|
||||
"Sha256": "f48a55e9fd4da1b84c2a9e960a9f3bc6e9fa65387ed9181826e1f052b2ce545e"
|
||||
}
|
||||
}
|
||||
],
|
||||
"archlinux": [
|
||||
],
|
||||
"archlinux": [
|
||||
{
|
||||
"Name": "archlinux",
|
||||
"FriendlyName": "Arch Linux",
|
||||
|
||||
@ -3,6 +3,7 @@ import json
|
||||
import sys
|
||||
import hashlib
|
||||
import base64
|
||||
import difflib
|
||||
from urllib.request import urlretrieve
|
||||
from xml.etree import ElementTree
|
||||
import tempfile
|
||||
@ -65,7 +66,16 @@ if __name__ == "__main__":
|
||||
exit(1)
|
||||
|
||||
with open(sys.argv[1]) as fd:
|
||||
content = json.loads(fd.read())
|
||||
data = fd.read()
|
||||
content = json.loads(data)
|
||||
diff = difflib.unified_diff(
|
||||
data.splitlines(keepends=True),
|
||||
(json.dumps(content, indent=4) + "\n").splitlines(keepends=True),
|
||||
fromfile="a" + sys.argv[1],
|
||||
tofile="b" + sys.argv[1],
|
||||
)
|
||||
diff = "".join(diff)
|
||||
assert diff == "", diff
|
||||
|
||||
distros = content['Distributions']
|
||||
assert is_unique([e.get('StoreAppId') for e in distros if e])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user