Skip to content

Commit 2d848fa

Browse files
authored
Reformat JSON files to canonical form and add test to keep them so (#295)
Formatting the JSON files (primarily the schemas) consistently makes it easier to machine-edit many files with Python or jq without introducing irrelevant and distracting deltas. If machine-editing files with a more primitive tool that isn't JSON-aware inconsistencies can even result in unexpected results. To make sure we don't start to diverge a new Python-based test that's run from tox.ini checks that all .json files are formatted like Python pretty-prints them (which also appears to coincide with how jq wants files to be formatted).
1 parent 3c77428 commit 2d848fa

File tree

152 files changed

+1917
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+1917
-685
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__

examples/events/EiffelActivityCanceledEvent/simple.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
"type": "CAUSE",
1818
"target": "aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee2"
1919
}
20-
]
20+
]
2121
}

examples/events/EiffelActivityFinishedEvent/simple.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
{
2020
"name": "firstLog (plain text)",
2121
"mediaType": "text/plain",
22-
"tags": ["plain"],
22+
"tags": [
23+
"plain"
24+
],
2325
"uri": "http://myHost.com/firstLog.log"
2426
},
2527
{

examples/events/EiffelActivityStartedEvent/simple.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
{
1717
"name": "My build log (plain text)",
1818
"mediaType": "text/plain",
19-
"tags": ["plain"],
19+
"tags": [
20+
"plain"
21+
],
2022
"uri": "file:///tmp/logs/data.log"
2123
}
2224
]

examples/events/EiffelActivityTriggeredEvent/simple-customdata.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,20 @@
2020
}
2121
],
2222
"executionType": "AUTOMATED",
23-
"customData" : [
24-
{
25-
"key":"key1",
26-
"value": "value1"
27-
},
28-
{
29-
"key":"key2",
30-
"value": [1,2,3]
31-
}
32-
]
23+
"customData": [
24+
{
25+
"key": "key1",
26+
"value": "value1"
27+
},
28+
{
29+
"key": "key2",
30+
"value": [
31+
1,
32+
2,
33+
3
34+
]
35+
}
36+
]
3337
},
3438
"links": [
3539
{

examples/events/EiffelArtifactCreatedEvent/backend.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
}
1414
],
1515
"buildCommand": "/my/build/command with arguments",
16-
"implements": ["pkg:maven/com.mycompany.myproduct/my-interface@%5B1.0%2C2.0%29"]
16+
"implements": [
17+
"pkg:maven/com.mycompany.myproduct/my-interface@%5B1.0%2C2.0%29"
18+
]
1719
},
1820
"links": [
1921
{

examples/events/EiffelArtifactCreatedEvent/dependent.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
}
1717
],
1818
"buildCommand": "/my/build/command with arguments",
19-
"dependsOn": ["pkg:maven/com.mycompany.myproduct/my-interface@%5B1.0%2C2.0%29"]
19+
"dependsOn": [
20+
"pkg:maven/com.mycompany.myproduct/my-interface@%5B1.0%2C2.0%29"
21+
]
2022
},
2123
"links": [
2224
{

examples/events/EiffelArtifactCreatedEvent/simple.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@
1717
"fileInformation": [
1818
{
1919
"name": "debug/launch",
20-
"tags": ["debug", "launcher"]
20+
"tags": [
21+
"debug",
22+
"launcher"
23+
]
2124
},
2225
{
2326
"name": "test/log.txt"
2427
},
2528
{
2629
"name": "bin/launch",
27-
"tags": ["launcher"]
30+
"tags": [
31+
"launcher"
32+
]
2833
}
2934
],
3035
"buildCommand": "/my/build/command with arguments",

examples/events/EiffelArtifactReusedEvent/simple.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"customer-a"
1414
]
1515
},
16-
"data": {
17-
},
16+
"data": {},
1817
"links": [
1918
{
2019
"type": "CONTEXT",

examples/events/EiffelFlowContextDefinedEvent/simple.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
"track": "CustomerXAdaptations",
1313
"version": "4.3.0"
1414
},
15-
"links": [
16-
]
15+
"links": []
1716
}

0 commit comments

Comments
 (0)