Skip to content

Commit

Permalink
ci: improve schema
Browse files Browse the repository at this point in the history
  • Loading branch information
cfabianski committed Oct 10, 2023
1 parent f940a61 commit 4f719aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion scripts/rule_schema.json → scripts/rule_schema.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@
"languages": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"enum": [
"sql", // built-in
"ruby",
"java",
"javascript",
"go",
"python"
]
}
},
"trigger": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ for rule_file in $(find $PWD/rules -type f | grep .yml | grep -vE '.snapshots|.g
args="$args -d $rule_file"
done

npx ajv-cli -s scripts/rule_schema.json$args --allow-union-types
npx ajv-cli -s scripts/rule_schema.jsonc$args --allow-union-types

0 comments on commit 4f719aa

Please sign in to comment.