Skip to content

Commit f977660

Browse files
feature: add sourcemeta jsonschema linting to pre-commit
relates to #401
1 parent d51cb12 commit f977660

File tree

7 files changed

+40
-6
lines changed

7 files changed

+40
-6
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ repos:
8282
language: system
8383
entry: shellcheck
8484
args: ["--severity=error"]
85+
- id: sourcemeta-jsonschema-lint
86+
name: sourcemeta-jsonschema-lint
87+
files: ^schemas/
88+
# This is from json schema std so not touching it
89+
exclude: ^schemas/json-schema-draft-07.json
90+
args:
91+
- --disable
92+
- const_with_type
93+
# Below goes away once hook isn't local
94+
language: system
95+
types: [json]
96+
entry: jsonschema lint
8597

8698
- repo: https://github.com/scop/pre-commit-shfmt
8799
rev: v3.11.0-1

bin/.container-tag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6
1+
0.7

package-lock.json

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"@antora/cli": "3.1.7",
55
"@antora/lunr-extension": "1.0.0-alpha.8",
66
"@antora/site-generator": "3.1.7",
7-
"asciidoctor-kroki": "0.17.0",
87
"@asciidoctor/tabs": "v1.0.0-beta.6",
8+
"asciidoctor-kroki": "0.17.0",
99
"prettier": "3.4.2",
10+
"@sourcemeta/jsonschema": "7.2.3",
1011
"wavedrom-cli": "^3.1.1"
1112
}
1213
}

schemas/cert_class_schema.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"description": "Descriptive name of the class"
2424
},
2525
"processor_kind": {
26-
"type": "string",
2726
"enum": ["Generic Unprivileged", "Microcontroller", "Apps Processor"],
2827
"description": "What kind of class is this?"
2928
},
@@ -34,7 +33,6 @@
3433
"mandatory_priv_modes": {
3534
"type": "array",
3635
"items": {
37-
"type": "string",
3836
"enum": ["M", "S", "U", "VS", "VU"]
3937
},
4038
"uniqueItems": true,

schemas/cert_model_schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
"description": "List of semantic versions within the model"
9797
},
9898
"base": {
99-
"type": "integer",
10099
"enum": [32, 64],
101100
"description": "Base of the model"
102101
},

schemas/profile_class_schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"const": "profile class"
1414
},
1515
"processor_kind": {
16-
"type": "string",
1716
"enum": ["Generic Unprivileged", "Microcontroller", "Apps Processor"],
1817
"description": "What kind of class is this?"
1918
},

0 commit comments

Comments
 (0)