summaryrefslogtreecommitdiffhomepage
path: root/tools/nogo/config-schema.json
blob: 3c25fe221abfda0c0fc54b7e2e871bafcc3d8f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
  "$schema": "http://json-schema.org/draft-07/schema",
  "definitions": {
    "group": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the group.",
          "type": "string"
        },
        "regex": {
          "description": "A regular expression for matching paths.",
          "type": "string"
        },
        "default": {
          "description": "Whether the group is enabled by default.",
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "regex",
        "default"
      ],
      "additionalProperties": false
    },
    "regexlist": {
      "description": "A list of regular expressions.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "rule": {
      "type": "object",
      "properties": {
        "exclude": {
          "description": "A regular expression for paths to exclude.",
          "$ref": "#/definitions/regexlist"
        },
        "suppress": {
          "description": "A regular expression for messages to suppress.",
          "$ref": "#/definitions/regexlist"
        }
      },
      "additionalProperties": false
    },
    "ruleList": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "$ref": "#/definitions/rule"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "properties": {
    "groups": {
      "description": "A definition of all groups.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/group"
      },
      "minItems": 1
    },
    "global": {
      "description": "A global set of rules.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/rule"
      }
    },
    "analyzers": {
      "description": "A definition of all groups.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/ruleList"
      }
    }
  },
  "required": [
    "groups"
  ],
  "additionalProperties": false
}