1
0
Fork 0
salty-dog/rules/salty-dog.yml

81 lines
1.5 KiB
YAML
Raw Normal View History

name: salty-dog-meta
definitions:
rule:
type: object
additionalProperties: false
required:
# metadata
- name
- desc
- level
- tags
# data
- select
- check
properties:
name:
type: string
pattern: "[-a-z0-9]+"
desc:
type: string
minLength: 8
maxLength: 255
level:
type: string
enum:
- debug
- info
- warn
- error
tags:
type: array
items:
type: string
pattern: "[-:a-z0-9]+"
select:
type: string
minLength: 1
filter:
type: object
check:
type: object
2019-06-16 00:43:01 +00:00
rules:
- name: salty-dog-rule
desc: rules must be complete
level: info
tags:
- important
2019-06-16 03:54:40 +00:00
- salty-dog
2019-06-16 00:43:01 +00:00
select: '$.rules[*]'
check:
$ref: "salty-dog-meta#/definitions/rule"
- name: salty-dog-source
desc: source files must have rules
level: info
tags:
- important
- salty-dog
select: '$'
2019-06-16 00:43:01 +00:00
check:
type: object
additionalProperties: false
required: [name, rules]
2019-06-16 00:43:01 +00:00
properties:
definitions:
type: object
additionalProperties: false
patternProperties:
"[-a-z]+":
type: object
2019-06-16 00:43:01 +00:00
name:
type: string
2019-06-22 17:33:50 +00:00
pattern: "[-a-z]+"
rules:
2019-06-16 00:43:01 +00:00
type: array
minItems: 1
2019-06-16 00:43:01 +00:00
items:
$ref: "salty-dog-meta#/definitions/rule"