@cplieger/deadset-ts 8.0.0-dev.1 → 8.0.0-dev.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/mapper-connection.js +2 -1
  3. package/dist/bin/node-host.js +24 -5
  4. package/dist/src/analysis.js +181 -341
  5. package/dist/src/augmentations.js +106 -13
  6. package/dist/src/automatic-types.js +10 -29
  7. package/dist/src/build-scripts.js +425 -0
  8. package/dist/src/component-layer.js +4 -2
  9. package/dist/src/components.js +2 -3
  10. package/dist/src/config.js +6 -82
  11. package/dist/src/configuration-files.js +28 -176
  12. package/dist/src/configured-declarations.js +15 -20
  13. package/dist/src/conformance-record.js +1 -1
  14. package/dist/src/consumers.js +3 -30
  15. package/dist/src/contextual-uses.js +56 -9
  16. package/dist/src/contract/config.generated.js +558 -0
  17. package/dist/src/contract/contract.generated.js +1244 -0
  18. package/dist/src/contract/report.generated.js +862 -0
  19. package/dist/src/convention-rows.js +73 -3
  20. package/dist/src/conventions.js +36 -66
  21. package/dist/src/dependencies.js +103 -40
  22. package/dist/src/edges.js +38 -122
  23. package/dist/src/element-access.js +4 -6
  24. package/dist/src/entry-point-gaps.js +2 -8
  25. package/dist/src/entry-points.js +11 -27
  26. package/dist/src/enum-group.js +3 -10
  27. package/dist/src/erased-stores.js +4 -6
  28. package/dist/src/exempt-classes.js +1 -63
  29. package/dist/src/exempt.js +21 -40
  30. package/dist/src/failure.js +36 -0
  31. package/dist/src/file-facts.js +2 -25
  32. package/dist/src/findings/completion.js +139 -72
  33. package/dist/src/findings/dependencies-and-module-machinery.js +4 -5
  34. package/dist/src/findings/emitters.js +5 -5
  35. package/dist/src/findings/interfaces.js +4 -5
  36. package/dist/src/findings/intra-function.js +13 -10
  37. package/dist/src/findings/non-code-artifacts.js +7 -8
  38. package/dist/src/findings/reads-and-writes.js +16 -13
  39. package/dist/src/findings/self-check.js +10 -12
  40. package/dist/src/findings/unused-declarations.js +41 -32
  41. package/dist/src/findings/visibility-narrowing.js +19 -16
  42. package/dist/src/findings-pass.js +8 -15
  43. package/dist/src/framework-lifecycle.js +7 -7
  44. package/dist/src/fs/document.js +52 -0
  45. package/dist/src/fs/manifest.js +72 -0
  46. package/dist/src/fs/tree.js +88 -0
  47. package/dist/src/generated-file.js +7 -4
  48. package/dist/src/git-ignore.js +39 -26
  49. package/dist/src/graph.js +5 -3
  50. package/dist/src/html-entries.js +6 -33
  51. package/dist/src/in-operands.js +2 -1
  52. package/dist/src/index.js +1 -1
  53. package/dist/src/injection-container.js +1 -1
  54. package/dist/src/intra-function-parts.js +63 -43
  55. package/dist/src/inventory.js +2 -21
  56. package/dist/src/javascript-file.js +33 -0
  57. package/dist/src/json-document.js +198 -67
  58. package/dist/src/keyof-comparisons.js +4 -6
  59. package/dist/src/kinds.js +3 -366
  60. package/dist/src/load/classify.js +270 -0
  61. package/dist/src/load/diagnostics.js +80 -0
  62. package/dist/src/load/discover.js +277 -0
  63. package/dist/src/{emit-map.js → load/emit-map.js} +1 -1
  64. package/dist/src/load/expected-module.js +136 -0
  65. package/dist/src/load/load.js +27 -0
  66. package/dist/src/load/module-lookup.js +37 -0
  67. package/dist/src/load/plan.js +313 -0
  68. package/dist/src/load/specifiers.js +115 -0
  69. package/dist/src/load/synthesize.js +140 -0
  70. package/dist/src/load/test-globals.js +207 -0
  71. package/dist/src/load/test-joins.js +82 -0
  72. package/dist/src/{workspace-manifests.js → load/workspace-manifests.js} +4 -4
  73. package/dist/src/{workspace-programs.js → load/workspace-programs.js} +89 -66
  74. package/dist/src/{workspace-resolution.js → load/workspace-resolution.js} +23 -65
  75. package/dist/src/{workspace-run.js → load/workspace-run.js} +7 -7
  76. package/dist/src/{workspace.js → load/workspace.js} +62 -124
  77. package/dist/src/manifest.js +49 -54
  78. package/dist/src/matrix.js +76 -4
  79. package/dist/src/mdx-entries.js +3 -26
  80. package/dist/src/outside-tests.js +1 -1
  81. package/dist/src/partial.js +2 -1
  82. package/dist/src/paths.js +26 -15
  83. package/dist/src/position.js +2 -1
  84. package/dist/src/print.js +11 -79
  85. package/dist/src/product.js +13 -0
  86. package/dist/src/query.js +1 -0
  87. package/dist/src/ref.js +1 -0
  88. package/dist/src/references.js +48 -30
  89. package/dist/src/report-schema.js +51 -0
  90. package/dist/src/report.js +57 -41
  91. package/dist/src/reporters/annotations.js +15 -8
  92. package/dist/src/reporters/sarif.js +16 -10
  93. package/dist/src/reporters/template.js +4 -19
  94. package/dist/src/resolve.js +245 -729
  95. package/dist/src/roots.js +273 -87
  96. package/dist/src/run.js +66 -77
  97. package/dist/src/schema.js +320 -343
  98. package/dist/src/scope.js +38 -115
  99. package/dist/src/serialization-contract.js +595 -21
  100. package/dist/src/session.js +34 -29
  101. package/dist/src/source-files.js +1 -1
  102. package/dist/src/suppress-file.js +25 -28
  103. package/dist/src/suppress-inline.js +3 -2
  104. package/dist/src/suppress.js +33 -51
  105. package/dist/src/sweep.js +7 -9
  106. package/dist/src/symbol-keys.js +3 -5
  107. package/dist/src/template-field.js +9 -19
  108. package/dist/src/test-support.js +8 -11
  109. package/dist/src/text/compare.js +26 -0
  110. package/dist/src/text/glob.js +194 -0
  111. package/dist/src/text/named-files.js +54 -0
  112. package/dist/src/text/shell.js +159 -0
  113. package/dist/src/text/yaml.js +393 -0
  114. package/dist/src/type-errors.js +11 -232
  115. package/dist/src/unseen-loads.js +100 -0
  116. package/dist/src/unwrap.js +23 -0
  117. package/dist/src/usage.js +10 -0
  118. package/dist/src/verbs/analyze.js +166 -126
  119. package/dist/src/verbs/describe.js +9 -16
  120. package/dist/src/verbs/explain.js +10 -7
  121. package/dist/src/verbs/print-config.js +2 -1
  122. package/dist/src/verbs/print-projects.js +6 -4
  123. package/dist/src/verbs/print-retained.js +4 -2
  124. package/dist/src/verbs/print-roots.js +4 -2
  125. package/dist/src/verbs/verb.js +1 -5
  126. package/dist/src/verbs/version.js +14 -3
  127. package/dist/src/workflow-steps.js +62 -64
  128. package/jsr.json +1 -1
  129. package/package.json +5 -4
  130. package/src/analysis.ts +245 -502
  131. package/src/augmentations.ts +135 -17
  132. package/src/automatic-types.ts +11 -29
  133. package/src/build-scripts.ts +543 -0
  134. package/src/component-layer.ts +4 -2
  135. package/src/components.ts +2 -4
  136. package/src/config.ts +31 -302
  137. package/src/configuration-files.ts +34 -179
  138. package/src/configured-declarations.ts +18 -23
  139. package/src/conformance-record.ts +1 -1
  140. package/src/consumers.ts +6 -57
  141. package/src/contextual-uses.ts +64 -12
  142. package/src/contract/config.generated.ts +818 -0
  143. package/src/contract/contract.generated.ts +1308 -0
  144. package/src/contract/report.generated.ts +1237 -0
  145. package/src/convention-rows.ts +85 -3
  146. package/src/conventions.ts +46 -84
  147. package/src/dependencies.ts +118 -46
  148. package/src/edges.ts +41 -140
  149. package/src/element-access.ts +4 -7
  150. package/src/entry-point-gaps.ts +3 -9
  151. package/src/entry-points.ts +12 -38
  152. package/src/enum-group.ts +2 -11
  153. package/src/erased-stores.ts +3 -7
  154. package/src/exempt-classes.ts +1 -75
  155. package/src/exempt.ts +36 -50
  156. package/src/failure.ts +63 -0
  157. package/src/file-facts.ts +9 -24
  158. package/src/finding.ts +14 -9
  159. package/src/findings/boundary.ts +2 -0
  160. package/src/findings/completion.ts +181 -84
  161. package/src/findings/dependencies-and-module-machinery.ts +4 -7
  162. package/src/findings/emitter.ts +8 -9
  163. package/src/findings/emitters.ts +7 -7
  164. package/src/findings/interfaces.ts +4 -6
  165. package/src/findings/intra-function.ts +13 -11
  166. package/src/findings/non-code-artifacts.ts +9 -11
  167. package/src/findings/reads-and-writes.ts +20 -16
  168. package/src/findings/self-check.ts +11 -17
  169. package/src/findings/unused-declarations.ts +45 -32
  170. package/src/findings/visibility-narrowing.ts +20 -17
  171. package/src/findings-pass.ts +10 -19
  172. package/src/framework-lifecycle.ts +7 -7
  173. package/src/fs/document.ts +70 -0
  174. package/src/fs/manifest.ts +92 -0
  175. package/src/fs/tree.ts +110 -0
  176. package/src/generated-file.ts +7 -4
  177. package/src/git-ignore.ts +50 -26
  178. package/src/graph.ts +5 -3
  179. package/src/host.ts +12 -5
  180. package/src/html-entries.ts +6 -33
  181. package/src/in-operands.ts +2 -1
  182. package/src/index.ts +1 -1
  183. package/src/injection-container.ts +1 -1
  184. package/src/intra-function-parts.ts +73 -44
  185. package/src/inventory.ts +2 -20
  186. package/src/javascript-file.ts +37 -0
  187. package/src/json-document.ts +241 -76
  188. package/src/keyof-comparisons.ts +3 -7
  189. package/src/kinds.ts +5 -413
  190. package/src/load/classify.ts +397 -0
  191. package/src/load/diagnostics.ts +144 -0
  192. package/src/load/discover.ts +455 -0
  193. package/src/{emit-map.ts → load/emit-map.ts} +1 -1
  194. package/src/load/expected-module.ts +188 -0
  195. package/src/load/load.ts +73 -0
  196. package/src/load/module-lookup.ts +50 -0
  197. package/src/load/plan.ts +504 -0
  198. package/src/load/specifiers.ts +168 -0
  199. package/src/load/synthesize.ts +211 -0
  200. package/src/load/test-globals.ts +251 -0
  201. package/src/load/test-joins.ts +98 -0
  202. package/src/{workspace-manifests.ts → load/workspace-manifests.ts} +5 -5
  203. package/src/{workspace-programs.ts → load/workspace-programs.ts} +128 -85
  204. package/src/{workspace-resolution.ts → load/workspace-resolution.ts} +33 -76
  205. package/src/{workspace-run.ts → load/workspace-run.ts} +18 -16
  206. package/src/{workspace.ts → load/workspace.ts} +90 -134
  207. package/src/manifest.ts +81 -75
  208. package/src/matrix.ts +122 -4
  209. package/src/mdx-entries.ts +3 -26
  210. package/src/outside-tests.ts +1 -1
  211. package/src/partial.ts +3 -2
  212. package/src/paths.ts +27 -15
  213. package/src/position.ts +2 -1
  214. package/src/print.ts +12 -92
  215. package/src/product.ts +18 -0
  216. package/src/query.ts +11 -0
  217. package/src/ref.ts +1 -0
  218. package/src/references.ts +52 -31
  219. package/src/report-schema.ts +68 -0
  220. package/src/report.ts +101 -224
  221. package/src/reporters/annotations.ts +22 -11
  222. package/src/reporters/json.ts +1 -1
  223. package/src/reporters/reporter.ts +2 -4
  224. package/src/reporters/reporters.ts +1 -1
  225. package/src/reporters/sarif.ts +29 -16
  226. package/src/reporters/template.ts +4 -20
  227. package/src/reporters/text.ts +3 -3
  228. package/src/resolve.ts +283 -1114
  229. package/src/roots.ts +339 -104
  230. package/src/run.ts +75 -91
  231. package/src/schema.ts +391 -388
  232. package/src/scope.ts +46 -138
  233. package/src/serialization-contract.ts +763 -22
  234. package/src/session.ts +70 -54
  235. package/src/source-files.ts +1 -1
  236. package/src/suppress-file.ts +24 -33
  237. package/src/suppress-inline.ts +2 -2
  238. package/src/suppress.ts +43 -58
  239. package/src/sweep.ts +23 -9
  240. package/src/symbol-keys.ts +2 -5
  241. package/src/template-field.ts +15 -25
  242. package/src/test-support.ts +17 -13
  243. package/src/text/compare.ts +27 -0
  244. package/src/text/glob.ts +210 -0
  245. package/src/text/named-files.inputs.json +1522 -0
  246. package/src/text/named-files.ts +68 -0
  247. package/src/text/shell.ts +161 -0
  248. package/src/text/yaml.ts +423 -0
  249. package/src/type-errors.ts +18 -288
  250. package/src/unseen-loads.ts +134 -0
  251. package/src/unwrap.ts +34 -0
  252. package/src/usage.ts +10 -0
  253. package/src/verbs/analyze.ts +224 -162
  254. package/src/verbs/describe.ts +14 -15
  255. package/src/verbs/explain.ts +10 -11
  256. package/src/verbs/print-config.ts +2 -1
  257. package/src/verbs/print-projects.ts +6 -4
  258. package/src/verbs/print-retained.ts +4 -2
  259. package/src/verbs/print-roots.ts +4 -2
  260. package/src/verbs/verb.ts +2 -8
  261. package/src/verbs/version.ts +15 -3
  262. package/src/workflow-steps.ts +74 -64
  263. package/dist/src/base-url.js +0 -18
  264. package/dist/src/discover.js +0 -468
  265. package/dist/src/glob.js +0 -65
  266. package/dist/src/pnpm-workspace.js +0 -120
  267. package/dist/src/setup-failure.js +0 -23
  268. package/dist/src/test-joins.js +0 -101
  269. package/dist/src/version.js +0 -7
  270. package/src/base-url.ts +0 -24
  271. package/src/discover.ts +0 -653
  272. package/src/glob.ts +0 -67
  273. package/src/pnpm-workspace.ts +0 -135
  274. package/src/setup-failure.ts +0 -39
  275. package/src/test-joins.ts +0 -120
  276. package/src/version.ts +0 -7
@@ -0,0 +1,862 @@
1
+ // Code generated by scripts/gen-report.ts from the Contract copy under fixtures/ (npm run gen). DO NOT EDIT.
2
+ /** The report and finding schemas, as the validator reads them. */
3
+ export const REPORT_SCHEMAS = {
4
+ "report.schema.json": {
5
+ type: "object",
6
+ additionalProperties: false,
7
+ required: [
8
+ "schema_version",
9
+ "contract_version",
10
+ "analyzer",
11
+ "target",
12
+ "configurations",
13
+ "configurations_not_built",
14
+ "consumers",
15
+ "findings",
16
+ "edge_evaluations",
17
+ "stale_suppressions",
18
+ "declared_gaps",
19
+ "excluded_by_cgo",
20
+ "test_file_rules",
21
+ "type_error_skips",
22
+ "notes",
23
+ "unanswered_questions",
24
+ "conventions_applied",
25
+ "totals",
26
+ ],
27
+ allOf: [
28
+ {
29
+ if: {
30
+ required: ["analyzer"],
31
+ properties: {
32
+ analyzer: {
33
+ required: ["languages"],
34
+ properties: { languages: { items: { enum: ["proto"] } } },
35
+ },
36
+ },
37
+ },
38
+ then: {
39
+ properties: {
40
+ configurations: { maxItems: 0 },
41
+ target: { not: { anyOf: [{ required: ["kind"] }, { required: ["language_kinds"] }] } },
42
+ },
43
+ },
44
+ else: { properties: { configurations: { minItems: 1 }, target: { required: ["kind"] } } },
45
+ },
46
+ ],
47
+ properties: {
48
+ schema_version: { type: "string", pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
49
+ contract_version: { type: "string", pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
50
+ analyzer: {
51
+ type: "object",
52
+ additionalProperties: false,
53
+ required: ["name", "version", "languages", "schema_versions_accepted", "conformance"],
54
+ properties: {
55
+ name: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
56
+ version: {
57
+ type: "string",
58
+ pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$",
59
+ },
60
+ languages: {
61
+ type: "array",
62
+ minItems: 1,
63
+ uniqueItems: true,
64
+ items: { type: "string", enum: ["go", "ts", "proto"] },
65
+ },
66
+ schema_versions_accepted: {
67
+ type: "array",
68
+ minItems: 1,
69
+ uniqueItems: true,
70
+ items: { type: "string", pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
71
+ },
72
+ conformance: {
73
+ type: "object",
74
+ additionalProperties: false,
75
+ required: ["corpus_version", "result", "digest"],
76
+ properties: {
77
+ corpus_version: { type: "string", pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
78
+ result: { type: "string", enum: ["pass", "fail"] },
79
+ digest: { type: "string", pattern: "^sha256:[0-9a-f]{64}$" },
80
+ },
81
+ },
82
+ },
83
+ },
84
+ merged_from: {
85
+ type: "array",
86
+ uniqueItems: true,
87
+ items: {
88
+ type: "object",
89
+ additionalProperties: false,
90
+ required: ["name", "version", "digest", "languages", "totals"],
91
+ properties: {
92
+ name: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
93
+ version: {
94
+ type: "string",
95
+ pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$",
96
+ },
97
+ digest: { type: "string", pattern: "^sha256:[0-9a-f]{64}$" },
98
+ languages: { $ref: "#/properties/analyzer/properties/languages" },
99
+ totals: { $ref: "#/properties/totals" },
100
+ },
101
+ },
102
+ },
103
+ target: {
104
+ type: "object",
105
+ additionalProperties: false,
106
+ required: ["root", "identity"],
107
+ if: { required: ["kind"], properties: { kind: { const: "mixed" } } },
108
+ then: { required: ["language_kinds"] },
109
+ else: { not: { required: ["language_kinds"] } },
110
+ properties: {
111
+ kind: { type: "string", enum: ["application", "library", "mixed"] },
112
+ language_kinds: {
113
+ type: "object",
114
+ additionalProperties: false,
115
+ minProperties: 2,
116
+ properties: {
117
+ go: { type: "string", enum: ["application", "library"] },
118
+ ts: { type: "string", enum: ["application", "library"] },
119
+ },
120
+ },
121
+ root: {
122
+ type: "string",
123
+ pattern: "^(?:\\.|(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*)$",
124
+ },
125
+ identity: { type: "string", minLength: 1 },
126
+ },
127
+ },
128
+ configurations: {
129
+ type: "array",
130
+ uniqueItems: true,
131
+ items: {
132
+ oneOf: [
133
+ {
134
+ type: "object",
135
+ additionalProperties: false,
136
+ required: ["id", "os", "arch", "tags"],
137
+ properties: {
138
+ id: { type: "string", minLength: 1 },
139
+ os: { type: "string", minLength: 1 },
140
+ arch: { type: "string", minLength: 1 },
141
+ tags: { type: "array", uniqueItems: true, items: { type: "string", minLength: 1 } },
142
+ },
143
+ },
144
+ {
145
+ type: "object",
146
+ additionalProperties: false,
147
+ required: ["id", "project"],
148
+ properties: {
149
+ id: { type: "string", minLength: 1 },
150
+ project: {
151
+ type: "string",
152
+ minLength: 1,
153
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
154
+ },
155
+ },
156
+ },
157
+ ],
158
+ },
159
+ },
160
+ configurations_not_built: {
161
+ type: "array",
162
+ uniqueItems: true,
163
+ items: {
164
+ oneOf: [
165
+ {
166
+ type: "object",
167
+ additionalProperties: false,
168
+ required: ["id", "os", "arch", "tags", "error"],
169
+ properties: {
170
+ id: { type: "string", minLength: 1 },
171
+ os: { type: "string", minLength: 1 },
172
+ arch: { type: "string", minLength: 1 },
173
+ tags: { type: "array", uniqueItems: true, items: { type: "string", minLength: 1 } },
174
+ error: { type: "string", minLength: 1, pattern: "^[^\\r\\n]+$" },
175
+ },
176
+ },
177
+ {
178
+ type: "object",
179
+ additionalProperties: false,
180
+ required: ["id", "project", "error"],
181
+ properties: {
182
+ id: { type: "string", minLength: 1 },
183
+ project: {
184
+ type: "string",
185
+ minLength: 1,
186
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
187
+ },
188
+ error: { type: "string", minLength: 1, pattern: "^[^\\r\\n]+$" },
189
+ },
190
+ },
191
+ ],
192
+ },
193
+ },
194
+ consumers: {
195
+ type: "object",
196
+ additionalProperties: false,
197
+ required: ["declared", "loaded", "unavailable"],
198
+ properties: {
199
+ declared: { type: "integer", minimum: 0 },
200
+ loaded: {
201
+ type: "array",
202
+ uniqueItems: true,
203
+ items: {
204
+ type: "object",
205
+ additionalProperties: false,
206
+ required: ["id", "role", "path"],
207
+ properties: {
208
+ id: { type: "string", minLength: 1 },
209
+ role: { type: "string", enum: ["consumer"] },
210
+ path: { type: "string", minLength: 1 },
211
+ },
212
+ },
213
+ },
214
+ unavailable: {
215
+ type: "array",
216
+ uniqueItems: true,
217
+ items: {
218
+ type: "object",
219
+ additionalProperties: false,
220
+ required: ["id", "role", "reason"],
221
+ properties: {
222
+ id: { type: "string", minLength: 1 },
223
+ role: { type: "string", enum: ["consumer"] },
224
+ reason: { type: "string", minLength: 1, pattern: "[^ \\t\\r\\n]" },
225
+ },
226
+ },
227
+ },
228
+ },
229
+ },
230
+ findings: {
231
+ type: "array",
232
+ items: { $ref: "finding.schema.json", properties: { retained_by: { maxItems: 0 } } },
233
+ },
234
+ components: {
235
+ type: "array",
236
+ items: {
237
+ type: "object",
238
+ additionalProperties: false,
239
+ required: ["id", "members"],
240
+ properties: {
241
+ id: { type: "string", pattern: "^[a-z][a-z0-9-]*/c-[0-9]+$" },
242
+ members: {
243
+ type: "array",
244
+ uniqueItems: true,
245
+ items: { $ref: "finding.schema.json#/$defs/positioned_symbol" },
246
+ },
247
+ },
248
+ },
249
+ },
250
+ edge_evaluations: {
251
+ type: "array",
252
+ items: {
253
+ type: "object",
254
+ additionalProperties: false,
255
+ required: ["edge", "side", "symbol", "state"],
256
+ properties: {
257
+ edge: { $ref: "finding.schema.json#/$defs/edge_identifier" },
258
+ side: { type: "string", enum: ["provides", "used_by"] },
259
+ symbol: { type: "string" },
260
+ state: { type: "string", enum: ["live", "dead", "absent"] },
261
+ finding: { $ref: "finding.schema.json" },
262
+ analyzer: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
263
+ },
264
+ if: { properties: { state: { const: "dead" } } },
265
+ then: { required: ["finding"] },
266
+ else: { not: { required: ["finding"] } },
267
+ },
268
+ },
269
+ stale_suppressions: {
270
+ type: "array",
271
+ items: {
272
+ type: "object",
273
+ additionalProperties: false,
274
+ required: ["code", "mechanism", "entry", "position", "symbol", "message"],
275
+ properties: {
276
+ code: { type: "string", const: "DS9003" },
277
+ mechanism: { type: "string", enum: ["inline", "ignore", "baseline"] },
278
+ entry: {
279
+ type: "object",
280
+ additionalProperties: false,
281
+ required: ["code", "path", "reason"],
282
+ properties: {
283
+ code: { type: "string", pattern: "^DS[0-9]{4}$" },
284
+ symbol: { type: "string" },
285
+ path: {
286
+ type: "string",
287
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
288
+ },
289
+ reason: { type: "string", minLength: 1, pattern: "[^ \\t\\r\\n]" },
290
+ },
291
+ },
292
+ position: {
293
+ type: "object",
294
+ additionalProperties: false,
295
+ required: ["path", "line", "column"],
296
+ properties: {
297
+ path: {
298
+ type: "string",
299
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
300
+ },
301
+ line: { type: "integer", minimum: 1 },
302
+ column: { type: "integer", minimum: 1 },
303
+ },
304
+ },
305
+ symbol: { type: "string" },
306
+ message: { type: "string", minLength: 1, pattern: "[^ \\t\\r\\n]" },
307
+ analyzer: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
308
+ },
309
+ },
310
+ },
311
+ declared_gaps: {
312
+ type: "array",
313
+ items: {
314
+ type: "object",
315
+ additionalProperties: false,
316
+ required: ["fixture", "capability", "reason"],
317
+ properties: {
318
+ fixture: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
319
+ symbol: {
320
+ type: "string",
321
+ pattern: "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$",
322
+ },
323
+ capability: { type: "string", pattern: "^(DS[0-9]{4}|[a-z][a-z0-9]*(-[a-z0-9]+)*)$" },
324
+ reason: { type: "string", minLength: 1, pattern: "[^ \\t\\r\\n]" },
325
+ analyzer: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
326
+ },
327
+ },
328
+ },
329
+ excluded_by_cgo: {
330
+ type: "array",
331
+ uniqueItems: true,
332
+ items: {
333
+ type: "string",
334
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
335
+ },
336
+ },
337
+ test_file_rules: {
338
+ type: "array",
339
+ uniqueItems: true,
340
+ items: {
341
+ type: "object",
342
+ additionalProperties: false,
343
+ required: ["rule", "matched"],
344
+ properties: {
345
+ rule: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
346
+ matched: { type: "integer", minimum: 0 },
347
+ },
348
+ },
349
+ },
350
+ type_error_skips: {
351
+ type: "array",
352
+ uniqueItems: true,
353
+ items: {
354
+ type: "object",
355
+ additionalProperties: false,
356
+ required: ["path", "line", "message"],
357
+ properties: {
358
+ path: {
359
+ type: "string",
360
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
361
+ },
362
+ line: { type: "integer", minimum: 1 },
363
+ message: { type: "string", minLength: 1, pattern: "^[^\\r\\n]+$" },
364
+ },
365
+ },
366
+ },
367
+ notes: {
368
+ type: "array",
369
+ uniqueItems: true,
370
+ items: {
371
+ type: "object",
372
+ additionalProperties: false,
373
+ required: ["kind", "path", "message"],
374
+ allOf: [
375
+ {
376
+ if: { properties: { kind: { const: "published-package" } } },
377
+ then: { required: ["key"] },
378
+ },
379
+ {
380
+ if: { properties: { kind: { const: "unmapped-entry" } } },
381
+ then: { required: ["key"] },
382
+ },
383
+ {
384
+ if: { properties: { kind: { const: "module-not-loaded" } } },
385
+ then: { not: { required: ["key"] } },
386
+ },
387
+ {
388
+ if: { properties: { kind: { const: "computed-load" } } },
389
+ then: { not: { required: ["key"] } },
390
+ },
391
+ {
392
+ if: { properties: { kind: { const: "unbound-schema" } } },
393
+ then: { required: ["key"] },
394
+ },
395
+ {
396
+ if: { properties: { kind: { const: "unresolved-import" } } },
397
+ then: { required: ["key"] },
398
+ },
399
+ {
400
+ if: { properties: { kind: { const: "generation-config-unread" } } },
401
+ then: { required: ["key"] },
402
+ },
403
+ {
404
+ if: { properties: { kind: { const: "binding-unsupported" } } },
405
+ then: { not: { required: ["key"] } },
406
+ },
407
+ {
408
+ if: { properties: { kind: { const: "schema-unparsed" } } },
409
+ then: { not: { required: ["key"] } },
410
+ },
411
+ {
412
+ if: { properties: { kind: { const: "unread-command" } } },
413
+ then: { not: { required: ["key"] } },
414
+ },
415
+ {
416
+ if: { properties: { kind: { const: "unresolved-specifier" } } },
417
+ then: { not: { required: ["key"] } },
418
+ },
419
+ ],
420
+ properties: {
421
+ kind: {
422
+ type: "string",
423
+ enum: [
424
+ "binding-unsupported",
425
+ "computed-load",
426
+ "generation-config-unread",
427
+ "module-not-loaded",
428
+ "published-package",
429
+ "schema-unparsed",
430
+ "unbound-schema",
431
+ "unmapped-entry",
432
+ "unread-command",
433
+ "unresolved-import",
434
+ "unresolved-specifier",
435
+ ],
436
+ },
437
+ path: {
438
+ type: "string",
439
+ pattern: "^(?:\\.|(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*)$",
440
+ },
441
+ key: {
442
+ type: "string",
443
+ enum: ["proto.import_paths", "proto.plugins", "roots.patterns", "ts.entry_files"],
444
+ },
445
+ message: { type: "string", minLength: 1, pattern: "^[^\\r\\n]+$" },
446
+ },
447
+ },
448
+ },
449
+ unanswered_questions: {
450
+ type: "array",
451
+ uniqueItems: true,
452
+ items: {
453
+ type: "object",
454
+ additionalProperties: false,
455
+ required: ["configuration", "questions", "declarations"],
456
+ properties: {
457
+ configuration: { type: "string", minLength: 1 },
458
+ questions: { type: "integer", minimum: 1 },
459
+ declarations: { type: "integer", minimum: 0 },
460
+ },
461
+ },
462
+ },
463
+ conventions_applied: {
464
+ type: "array",
465
+ uniqueItems: true,
466
+ items: {
467
+ type: "object",
468
+ additionalProperties: false,
469
+ required: ["name", "package", "version", "manifest"],
470
+ properties: {
471
+ name: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
472
+ package: { type: "string", minLength: 1 },
473
+ version: { type: "string", minLength: 1 },
474
+ manifest: {
475
+ type: "string",
476
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
477
+ },
478
+ },
479
+ },
480
+ },
481
+ totals: {
482
+ type: "object",
483
+ additionalProperties: false,
484
+ required: [
485
+ "findings",
486
+ "by_severity",
487
+ "deletable_lines",
488
+ "suppressions_in_effect",
489
+ "reasons_recorded",
490
+ "stale_suppressions",
491
+ "pending",
492
+ "omitted",
493
+ "withheld",
494
+ ],
495
+ properties: {
496
+ findings: { type: "integer", minimum: 0 },
497
+ by_severity: {
498
+ type: "object",
499
+ additionalProperties: false,
500
+ required: ["allow", "warn", "deny"],
501
+ properties: {
502
+ allow: { type: "integer", minimum: 0 },
503
+ warn: { type: "integer", minimum: 0 },
504
+ deny: { type: "integer", minimum: 0 },
505
+ },
506
+ },
507
+ deletable_lines: { type: "integer", minimum: 0 },
508
+ suppressions_in_effect: { type: "integer", minimum: 0 },
509
+ reasons_recorded: { type: "integer", minimum: 0 },
510
+ stale_suppressions: { type: "integer", minimum: 0 },
511
+ pending: { type: "integer", minimum: 0 },
512
+ omitted: { type: "integer", minimum: 0 },
513
+ withheld: {
514
+ type: "object",
515
+ additionalProperties: false,
516
+ required: ["certain", "probable", "possible"],
517
+ properties: {
518
+ certain: { type: "integer", minimum: 0, maximum: 0 },
519
+ probable: { type: "integer", minimum: 0 },
520
+ possible: { type: "integer", minimum: 0 },
521
+ },
522
+ },
523
+ },
524
+ },
525
+ },
526
+ },
527
+ "finding.schema.json": {
528
+ type: "object",
529
+ additionalProperties: false,
530
+ required: [
531
+ "code",
532
+ "kind",
533
+ "language",
534
+ "position",
535
+ "symbol",
536
+ "reachability_class",
537
+ "confidence",
538
+ "test_only",
539
+ "generated",
540
+ "component",
541
+ "retained_by",
542
+ "configurations",
543
+ "consumers_loaded",
544
+ "fixability",
545
+ "severity",
546
+ "message",
547
+ "details",
548
+ ],
549
+ properties: {
550
+ code: { type: "string", pattern: "^DS[0-9]{4}$" },
551
+ kind: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
552
+ language: { type: "string", enum: ["go", "ts", "proto"] },
553
+ position: { $ref: "#/$defs/position" },
554
+ symbol: {
555
+ type: "object",
556
+ additionalProperties: false,
557
+ required: ["ref", "kind", "name", "size_lines"],
558
+ properties: {
559
+ ref: { $ref: "#/$defs/symbol_reference" },
560
+ kind: {
561
+ type: "string",
562
+ enum: [
563
+ "function",
564
+ "method",
565
+ "type",
566
+ "class",
567
+ "interface",
568
+ "enum",
569
+ "namespace",
570
+ "variable",
571
+ "constant",
572
+ "export-alias",
573
+ "field",
574
+ "class-member",
575
+ "type-member",
576
+ "interface-method",
577
+ "enum-member",
578
+ "message",
579
+ "service",
580
+ "rpc",
581
+ "satisfaction-assertion",
582
+ "type-parameter",
583
+ "parameter",
584
+ "receiver",
585
+ "result",
586
+ "statement",
587
+ "case",
588
+ "store",
589
+ "file",
590
+ "import",
591
+ "dependency",
592
+ "module-directive",
593
+ "suppression",
594
+ "root",
595
+ "configured-declaration",
596
+ "edge",
597
+ ],
598
+ },
599
+ name: { type: "string", pattern: "^[^\\r\\n]+$" },
600
+ parent: { $ref: "#/$defs/symbol_reference" },
601
+ exported: { type: "boolean" },
602
+ size_lines: { type: "integer", minimum: 1 },
603
+ objectpath: { type: "string", minLength: 1 },
604
+ },
605
+ },
606
+ reachability_class: { type: "string", enum: ["certain", "probable", "possible"] },
607
+ confidence: { type: "string", enum: ["certain", "probable", "possible"] },
608
+ liveness_relation: { type: "string", enum: ["reference-counting", "reachability"] },
609
+ test_only: { type: "boolean" },
610
+ generated: { type: "boolean" },
611
+ component: {
612
+ type: "object",
613
+ additionalProperties: false,
614
+ required: ["id", "root", "symbol_count", "deletable_lines"],
615
+ properties: {
616
+ id: { type: "string", pattern: "^[a-z][a-z0-9-]*/c-[0-9]+$" },
617
+ root: { type: "boolean" },
618
+ symbol_count: { type: "integer", minimum: 1 },
619
+ deletable_lines: { type: "integer", minimum: 0 },
620
+ },
621
+ },
622
+ retained_by: {
623
+ type: "array",
624
+ uniqueItems: true,
625
+ items: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
626
+ },
627
+ configurations: { type: "array", uniqueItems: true, items: { type: "string", minLength: 1 } },
628
+ consumers_loaded: {
629
+ type: "array",
630
+ uniqueItems: true,
631
+ items: { type: "string", minLength: 1 },
632
+ },
633
+ fixability: { type: "string", enum: ["deletable", "narrowable", "manual", "none"] },
634
+ severity: { type: "string", enum: ["allow", "warn", "deny"] },
635
+ message: { type: "string", pattern: "^[^\\r\\n]*[^.\\r\\n]$" },
636
+ analyzer: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
637
+ details: {
638
+ type: "object",
639
+ additionalProperties: false,
640
+ properties: {
641
+ narrower_visibility: { type: "string", enum: ["file", "package", "module"] },
642
+ implementations: {
643
+ type: "array",
644
+ uniqueItems: true,
645
+ items: { $ref: "#/$defs/positioned_symbol" },
646
+ },
647
+ write_positions: {
648
+ type: "array",
649
+ minItems: 1,
650
+ uniqueItems: true,
651
+ items: { $ref: "#/$defs/position" },
652
+ },
653
+ excluded_by: { type: "string", minLength: 1 },
654
+ dependency_class: {
655
+ type: "string",
656
+ enum: ["require", "dependency", "dev-dependency", "peer-dependency"],
657
+ },
658
+ replacement: { type: "string", minLength: 1 },
659
+ mechanism: { type: "string", enum: ["inline", "ignore", "baseline"] },
660
+ entry: {
661
+ type: "object",
662
+ additionalProperties: false,
663
+ required: ["code"],
664
+ properties: {
665
+ code: { type: "string", pattern: "^DS[0-9]{4}$" },
666
+ symbol: { $ref: "#/$defs/symbol_reference" },
667
+ path: { $ref: "#/$defs/relative_path" },
668
+ reason: { type: "string", pattern: "[^ \\t\\r\\n]" },
669
+ },
670
+ },
671
+ overlap: {
672
+ type: "array",
673
+ minItems: 1,
674
+ uniqueItems: true,
675
+ items: { type: "string", minLength: 1 },
676
+ },
677
+ edge: { $ref: "#/$defs/edge_identifier" },
678
+ sides: {
679
+ type: "array",
680
+ minItems: 1,
681
+ uniqueItems: true,
682
+ items: {
683
+ type: "object",
684
+ additionalProperties: false,
685
+ required: ["side", "symbol", "state"],
686
+ properties: {
687
+ side: { type: "string", enum: ["provides", "used_by"] },
688
+ symbol: { $ref: "#/$defs/symbol_reference" },
689
+ state: { type: "string", enum: ["live", "dead", "absent"] },
690
+ },
691
+ },
692
+ },
693
+ removes_last_use_of: {
694
+ type: "array",
695
+ minItems: 1,
696
+ uniqueItems: true,
697
+ items: { type: "string", minLength: 1 },
698
+ },
699
+ name_literal: { $ref: "#/$defs/position" },
700
+ },
701
+ },
702
+ },
703
+ allOf: [
704
+ {
705
+ if: { required: ["code"], properties: { code: { enum: ["DS1501", "DS1502", "DS1503"] } } },
706
+ then: { properties: { details: { required: ["narrower_visibility"] } } },
707
+ else: {
708
+ properties: { details: { not: { anyOf: [{ required: ["narrower_visibility"] }] } } },
709
+ },
710
+ },
711
+ {
712
+ if: { required: ["code"], properties: { code: { enum: ["DS1201", "DS1202", "DS1203"] } } },
713
+ then: { properties: { details: { required: ["implementations"] } } },
714
+ else: { properties: { details: { not: { anyOf: [{ required: ["implementations"] }] } } } },
715
+ },
716
+ {
717
+ if: { required: ["code"], properties: { code: { enum: ["DS1301", "DS1404"] } } },
718
+ then: { properties: { details: { required: ["write_positions"] } } },
719
+ else: { properties: { details: { not: { anyOf: [{ required: ["write_positions"] }] } } } },
720
+ },
721
+ {
722
+ if: { required: ["code"], properties: { code: { const: "DS1601" } } },
723
+ then: {
724
+ allOf: [
725
+ {
726
+ if: { required: ["language"], properties: { language: { enum: ["go"] } } },
727
+ then: { properties: { details: { required: ["excluded_by"] } } },
728
+ else: {
729
+ properties: { details: { not: { anyOf: [{ required: ["excluded_by"] }] } } },
730
+ },
731
+ },
732
+ ],
733
+ },
734
+ else: { properties: { details: { not: { anyOf: [{ required: ["excluded_by"] }] } } } },
735
+ },
736
+ {
737
+ if: { required: ["code"], properties: { code: { const: "DS1701" } } },
738
+ then: { properties: { details: { required: ["dependency_class"] } } },
739
+ else: { properties: { details: { not: { anyOf: [{ required: ["dependency_class"] }] } } } },
740
+ },
741
+ {
742
+ if: { required: ["code"], properties: { code: { const: "DS1702" } } },
743
+ then: { properties: { details: { required: ["replacement"] } } },
744
+ else: { properties: { details: { not: { anyOf: [{ required: ["replacement"] }] } } } },
745
+ },
746
+ {
747
+ if: { required: ["code"], properties: { code: { enum: ["DS9001", "DS9002", "DS9003"] } } },
748
+ then: { properties: { details: { required: ["mechanism", "entry"] } } },
749
+ else: {
750
+ properties: {
751
+ details: { not: { anyOf: [{ required: ["mechanism"] }, { required: ["entry"] }] } },
752
+ },
753
+ },
754
+ },
755
+ {
756
+ if: {
757
+ required: ["code"],
758
+ properties: {
759
+ code: { enum: ["DS1401", "DS1402", "DS1403", "DS1404", "DS1405", "DS1406"] },
760
+ },
761
+ },
762
+ then: { properties: { details: { required: ["overlap"] } } },
763
+ else: { properties: { details: { not: { anyOf: [{ required: ["overlap"] }] } } } },
764
+ },
765
+ {
766
+ if: { required: ["code"], properties: { code: { const: "DS9005" } } },
767
+ then: { properties: { details: { required: ["edge", "sides"] } } },
768
+ else: {
769
+ properties: {
770
+ details: { not: { anyOf: [{ required: ["edge"] }, { required: ["sides"] }] } },
771
+ },
772
+ },
773
+ },
774
+ {
775
+ if: {
776
+ required: ["code"],
777
+ properties: {
778
+ code: { enum: ["DS1001", "DS1002", "DS1101", "DS1102", "DS1104", "DS1501", "DS1502"] },
779
+ },
780
+ },
781
+ then: {
782
+ if: { required: ["details"], properties: { details: { required: ["name_literal"] } } },
783
+ then: { properties: { reachability_class: { const: "possible" } } },
784
+ },
785
+ else: { properties: { details: { not: { anyOf: [{ required: ["name_literal"] }] } } } },
786
+ },
787
+ {
788
+ if: {
789
+ anyOf: [
790
+ {
791
+ required: ["symbol"],
792
+ properties: {
793
+ symbol: {
794
+ required: ["kind"],
795
+ properties: {
796
+ kind: {
797
+ enum: [
798
+ "case",
799
+ "configured-declaration",
800
+ "dependency",
801
+ "edge",
802
+ "file",
803
+ "import",
804
+ "module-directive",
805
+ "parameter",
806
+ "receiver",
807
+ "result",
808
+ "root",
809
+ "statement",
810
+ "store",
811
+ "suppression",
812
+ ],
813
+ },
814
+ },
815
+ },
816
+ },
817
+ },
818
+ {
819
+ required: ["code"],
820
+ properties: { code: { enum: ["DS1203", "DS1301", "DS1501", "DS1502", "DS1503"] } },
821
+ },
822
+ ],
823
+ },
824
+ then: { not: { required: ["liveness_relation"] } },
825
+ else: { required: ["liveness_relation"] },
826
+ },
827
+ {
828
+ if: { required: ["fixability"], properties: { fixability: { const: "deletable" } } },
829
+ else: { properties: { details: { not: { required: ["removes_last_use_of"] } } } },
830
+ },
831
+ ],
832
+ $defs: {
833
+ edge_identifier: { type: "string", pattern: "^[A-Za-z0-9_.-]+(/[A-Za-z0-9_.-]+)*$" },
834
+ position: {
835
+ type: "object",
836
+ additionalProperties: false,
837
+ required: ["path", "line", "column", "end_line"],
838
+ properties: {
839
+ path: { $ref: "#/$defs/relative_path" },
840
+ line: { type: "integer", minimum: 1 },
841
+ column: { type: "integer", minimum: 1 },
842
+ end_line: { type: "integer", minimum: 1 },
843
+ },
844
+ },
845
+ relative_path: {
846
+ type: "string",
847
+ pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
848
+ },
849
+ symbol_reference: { type: "string", minLength: 1 },
850
+ positioned_symbol: {
851
+ type: "object",
852
+ additionalProperties: false,
853
+ required: ["ref", "name", "position"],
854
+ properties: {
855
+ ref: { $ref: "#/$defs/symbol_reference" },
856
+ name: { type: "string", pattern: "^[^\\r\\n]+$" },
857
+ position: { $ref: "#/$defs/position" },
858
+ },
859
+ },
860
+ },
861
+ },
862
+ };