Files
IUMBTEMS/schemas/gates-config.schema.json

244 lines
5.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"version": {
"default": 1,
"type": "number",
"const": 1
},
"commands": {
"default": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"kind": {
"type": "string",
"enum": [
"format",
"lint",
"typecheck",
"test"
]
},
"command": {
"type": "string",
"minLength": 1
},
"parser": {
"default": "generic",
"type": "string",
"enum": [
"tsc",
"biome",
"eslint",
"prettier",
"ruff",
"ruff-format",
"mypy",
"cargo",
"gofmt",
"go-vet",
"bun-test",
"vitest",
"jest",
"pytest",
"go-test",
"cargo-test",
"generic"
]
},
"touchedArgs": {
"default": false,
"type": "boolean"
},
"extensions": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"related": {
"default": "none",
"type": "string",
"enum": [
"bun",
"vitest",
"jest",
"pytest",
"go",
"none"
]
},
"timeoutMs": {
"default": 300000,
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"id",
"kind",
"command",
"parser",
"touchedArgs",
"extensions",
"related",
"timeoutMs"
],
"additionalProperties": false
}
},
"budgets": {
"default": {
"maxDiffLines": 800,
"maxFileLines": 800,
"maxComplexity": 15,
"requireDepJustification": true,
"requireTestWithBehavior": true
},
"type": "object",
"properties": {
"maxDiffLines": {
"default": 800,
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"maxFileLines": {
"default": 800,
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"maxComplexity": {
"default": 15,
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"requireDepJustification": {
"default": true,
"type": "boolean"
},
"requireTestWithBehavior": {
"default": true,
"type": "boolean"
}
},
"required": [
"maxDiffLines",
"maxFileLines",
"maxComplexity",
"requireDepJustification",
"requireTestWithBehavior"
],
"additionalProperties": false
},
"security": {
"default": {
"secrets": true,
"gitleaks": "auto",
"osv": "auto"
},
"type": "object",
"properties": {
"secrets": {
"default": true,
"type": "boolean"
},
"gitleaks": {
"default": "auto",
"type": "string",
"enum": [
"auto",
"off"
]
},
"osv": {
"default": "auto",
"type": "string",
"enum": [
"auto",
"api",
"off"
]
}
},
"required": [
"secrets",
"gitleaks",
"osv"
],
"additionalProperties": false
},
"mutation": {
"default": {
"enabled": false,
"threshold": 0.8,
"maxMutants": 50
},
"type": "object",
"properties": {
"enabled": {
"default": false,
"type": "boolean"
},
"threshold": {
"default": 0.8,
"type": "number",
"minimum": 0,
"maximum": 1
},
"maxMutants": {
"default": 50,
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"threshold",
"maxMutants"
],
"additionalProperties": false
},
"topN": {
"default": 20,
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"ignore": {
"default": [
"**/node_modules/**",
"**/dist/**",
"**/*.lock",
"**/*.min.js"
],
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"version",
"commands",
"budgets",
"security",
"mutation",
"topN",
"ignore"
],
"additionalProperties": false
}