Skip to content

Commit

Permalink
move all of the tests into the lint definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Mar 1, 2024
1 parent 0b2cab3 commit ac84155
Show file tree
Hide file tree
Showing 25 changed files with 834 additions and 303 deletions.
252 changes: 252 additions & 0 deletions public/lang-docs.md

Large diffs are not rendered by default.

61 changes: 35 additions & 26 deletions public/lint-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
{
"additionalProperties": false,
"properties": {
"$schema": {"type": "string"},
"==": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -270,14 +271,16 @@
},
"required": ["left", "right"],
"type": "object"
}
},
"$schema": {"type": "string"}
},
"required": ["!="],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"$schema": {"type": "string"},
"<": {
"additionalProperties": false,
"properties": {
Expand All @@ -294,6 +297,7 @@
{
"additionalProperties": false,
"properties": {
"$schema": {"type": "string"},
">": {
"additionalProperties": false,
"properties": {
Expand All @@ -310,22 +314,7 @@
{
"additionalProperties": false,
"properties": {
"absDiff": {
"additionalProperties": false,
"properties": {
"left" : {"$ref": "#/definitions/LintValue"},
"right": {"$ref": "#/definitions/LintValue"}
},
"required": ["left", "right"],
"type": "object"
}
},
"required": ["absDiff"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"$schema": {"type": "string"},
"similar": {
"additionalProperties": false,
"properties": {
Expand All @@ -348,22 +337,24 @@
{
"additionalProperties": false,
"properties": {
"and": { "items": {"$ref": "#/definitions/LintExpression"}, "type": "array" }
"$schema": { "type": "string" },
"and" : { "type": "array" , "items": {"$ref": "#/definitions/LintExpression"} }
},
"required": ["and"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"or": { "items": {"$ref": "#/definitions/LintExpression"}, "type": "array" }
"$schema": { "type": "string" },
"or" : { "type": "array" , "items": {"$ref": "#/definitions/LintExpression"} }
},
"required": ["or"],
"type": "object"
},
{
"additionalProperties": false,
"properties": { "not": {"$ref": "#/definitions/LintExpression"} },
"properties": { "$schema": {"type": "string"}, "not": {"$ref": "#/definitions/LintExpression"} },
"required": ["not"],
"type": "object"
}
Expand All @@ -384,7 +375,7 @@
{
"additionalProperties": false,
"properties": {
"filter": {"$ref": "#/definitions/alias-1448761563-3695-3756-1448761563-0-6113"},
"filter": {"$ref": "#/definitions/alias-1448761563-3904-3965-1448761563-0-6322"},
"func" : {"$ref": "#/definitions/LintExpression"} ,
"varb" : {"type": "string"}
},
Expand All @@ -395,7 +386,7 @@
"additionalProperties": false,
"properties": {
"func": {"$ref": "#/definitions/LintValue"} ,
"map" : {"$ref": "#/definitions/alias-1448761563-3695-3756-1448761563-0-6113"},
"map" : {"$ref": "#/definitions/alias-1448761563-3904-3965-1448761563-0-6322"},
"varb": {"type": "string"}
},
"required": ["map", "func", "varb"],
Expand All @@ -404,7 +395,7 @@
{
"additionalProperties": false,
"properties": {
"reverse": {"$ref": "#/definitions/alias-1448761563-3695-3756-1448761563-0-6113"}
"reverse": {"$ref": "#/definitions/alias-1448761563-3904-3965-1448761563-0-6322"}
},
"required": ["reverse"],
"type": "object"
Expand All @@ -413,15 +404,15 @@
"additionalProperties": false,
"properties": {
"func": {"$ref": "#/definitions/LintValue"} ,
"sort": {"$ref": "#/definitions/alias-1448761563-3695-3756-1448761563-0-6113"},
"sort": {"$ref": "#/definitions/alias-1448761563-3904-3965-1448761563-0-6322"},
"varb": {"type": "string"}
},
"required": ["sort", "func", "varb"],
"type": "object"
},
{
"additionalProperties": false,
"properties": { "speed": {"$ref": "#/definitions/alias-1448761563-3695-3756-1448761563-0-6113"} },
"properties": { "speed": {"$ref": "#/definitions/alias-1448761563-3904-3965-1448761563-0-6322"} },
"required": ["speed"],
"type": "object"
}
Expand Down Expand Up @@ -508,6 +499,22 @@
},
"required": ["%"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"absDiff": {
"additionalProperties": false,
"properties": {
"left" : {"$ref": "#/definitions/LintValue"},
"right": {"$ref": "#/definitions/LintValue"}
},
"required": ["left", "right"],
"type": "object"
}
},
"required": ["absDiff"],
"type": "object"
}
]
},
Expand Down Expand Up @@ -596,6 +603,7 @@
{
"additionalProperties": false,
"properties": {
"$schema": {"type": "string"},
"all": {
"anyOf": [
{
Expand Down Expand Up @@ -649,6 +657,7 @@
{
"additionalProperties": false,
"properties": {
"$schema": {"type": "string"},
"exist": {
"anyOf": [
{
Expand Down Expand Up @@ -718,7 +727,7 @@
"description": "A LintValue is a JSON object that represents a value. It can be a string, a number, a boolean, a LintColor, a LintVariable, a LintMathOps, a LintPairOps, a LintAggregate, a LintColorFunction or a LintExpression"
},
"LintVariable": {"type": "string"},
"alias-1448761563-3695-3756-1448761563-0-6113": {
"alias-1448761563-3904-3965-1448761563-0-6322": {
"anyOf": [
{"$ref": "#/definitions/LintVariable"} ,
{ "items": {"$ref": "#/definitions/LintValue"}, "type": "array" },
Expand Down
Loading

0 comments on commit ac84155

Please sign in to comment.