repometry 0.0.0-stage → 0.2.0
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.
- package/LICENSE +21 -0
- package/README.md +28 -2
- package/package.json +64 -4
- package/target/main/resources/report/json/compact-json-v1.schema.json +24 -0
- package/target/main/resources/report/json/comparison-v1.schema.json +65 -0
- package/target/main/resources/report/json/config-v1.schema.json +33 -0
- package/target/main/resources/report/json/diff-coverage-v1.schema.json +55 -0
- package/target/main/resources/report/json/file-metrics-v1.schema.json +134 -0
- package/target/main/resources/report/json/inspection-context-v1.schema.json +172 -0
- package/target/main/resources/report/json/metabranch-v1.schema.json +9 -0
- package/target/main/resources/report/json/metric-catalog-v1.schema.json +31 -0
- package/target/main/resources/report/json/public-history-v1.schema.json +50 -0
- package/target/main/resources/report/json/pull-review-v1.schema.json +97 -0
- package/target/main/resources/report/json/quality-history-v1.schema.json +51 -0
- package/target/main/resources/report/json/report-v1.schema.json +65 -0
- package/target/main/resources/report/json/report-v2.schema.json +252 -0
- package/target/main/resources/report/json/repository-summary-v1.schema.json +181 -0
- package/target/main/resources/report/json/viewer-details-v1.schema.json +343 -0
- package/target/main/resources/report/json/viewer-inspection-v1.schema.json +13 -0
- package/target/main/resources/viewer/files.css +578 -0
- package/target/main/resources/viewer/index.html +120 -0
- package/target/main/resources/viewer/projects.html +52 -0
- package/target/main/resources/viewer/styles.css +560 -0
- package/target/main/resources/viewer/viewer-pulls.css +64 -0
- package/target/main/ts/api/gh/github.d.ts +6 -0
- package/target/main/ts/api/gh/github.js +92 -0
- package/target/main/ts/api/git/blob-batch.d.ts +10 -0
- package/target/main/ts/api/git/blob-batch.js +106 -0
- package/target/main/ts/api/git/changes.d.ts +22 -0
- package/target/main/ts/api/git/changes.js +108 -0
- package/target/main/ts/api/git/commit-metadata.d.ts +3 -0
- package/target/main/ts/api/git/commit-metadata.js +53 -0
- package/target/main/ts/api/git/git-churn.d.ts +9 -0
- package/target/main/ts/api/git/git-churn.js +71 -0
- package/target/main/ts/api/git/git-reader.d.ts +16 -0
- package/target/main/ts/api/git/git-reader.js +74 -0
- package/target/main/ts/api/git/git.d.ts +21 -0
- package/target/main/ts/api/git/git.js +153 -0
- package/target/main/ts/api/git/inspection-source.d.ts +15 -0
- package/target/main/ts/api/git/inspection-source.js +31 -0
- package/target/main/ts/api/git/local-sources.d.ts +5 -0
- package/target/main/ts/api/git/local-sources.js +47 -0
- package/target/main/ts/api/git/local.d.ts +3 -0
- package/target/main/ts/api/git/local.js +36 -0
- package/target/main/ts/api/git/metabranch-worktree.d.ts +1 -0
- package/target/main/ts/api/git/metabranch-worktree.js +35 -0
- package/target/main/ts/api/git/source-cache.d.ts +3 -0
- package/target/main/ts/api/git/source-cache.js +57 -0
- package/target/main/ts/api/import/finding-import.d.ts +9 -0
- package/target/main/ts/api/import/finding-import.js +227 -0
- package/target/main/ts/api/import/lcov-files.d.ts +5 -0
- package/target/main/ts/api/import/lcov-files.js +14 -0
- package/target/main/ts/api/import/profile-file.d.ts +4 -0
- package/target/main/ts/api/import/profile-file.js +17 -0
- package/target/main/ts/api/worker/remote-executor.d.ts +2 -0
- package/target/main/ts/api/worker/remote-executor.js +46 -0
- package/target/main/ts/api/worker/worker-protocol.d.ts +7 -0
- package/target/main/ts/api/worker/worker-protocol.js +102 -0
- package/target/main/ts/api/worker/worker.d.ts +5 -0
- package/target/main/ts/api/worker/worker.js +86 -0
- package/target/main/ts/cli/arguments.d.ts +28 -0
- package/target/main/ts/cli/arguments.js +111 -0
- package/target/main/ts/cli/config.d.ts +13 -0
- package/target/main/ts/cli/config.js +58 -0
- package/target/main/ts/cli/imports.d.ts +7 -0
- package/target/main/ts/cli/imports.js +30 -0
- package/target/main/ts/cli/main.d.ts +2 -0
- package/target/main/ts/cli/main.js +379 -0
- package/target/main/ts/cli/reporting.d.ts +18 -0
- package/target/main/ts/cli/reporting.js +104 -0
- package/target/main/ts/cli/revisions.d.ts +6 -0
- package/target/main/ts/cli/revisions.js +16 -0
- package/target/main/ts/cli/store.d.ts +13 -0
- package/target/main/ts/cli/store.js +39 -0
- package/target/main/ts/compose/analyze-snapshot.d.ts +4 -0
- package/target/main/ts/compose/analyze-snapshot.js +164 -0
- package/target/main/ts/compose/attach-churn.d.ts +2 -0
- package/target/main/ts/compose/attach-churn.js +50 -0
- package/target/main/ts/compose/diff-coverage.d.ts +20 -0
- package/target/main/ts/compose/diff-coverage.js +57 -0
- package/target/main/ts/compose/inspect.d.ts +23 -0
- package/target/main/ts/compose/inspect.js +45 -0
- package/target/main/ts/compose/plugin-list.d.ts +6 -0
- package/target/main/ts/compose/plugin-list.js +10 -0
- package/target/main/ts/compose/prepare-metabranch.d.ts +9 -0
- package/target/main/ts/compose/prepare-metabranch.js +17 -0
- package/target/main/ts/compose/review.d.ts +16 -0
- package/target/main/ts/compose/review.js +39 -0
- package/target/main/ts/compose/sources.d.ts +3 -0
- package/target/main/ts/compose/sources.js +30 -0
- package/target/main/ts/core/engine/execute.d.ts +10 -0
- package/target/main/ts/core/engine/execute.js +50 -0
- package/target/main/ts/core/engine/manifest.d.ts +4 -0
- package/target/main/ts/core/engine/manifest.js +105 -0
- package/target/main/ts/core/engine/plan.d.ts +22 -0
- package/target/main/ts/core/engine/plan.js +107 -0
- package/target/main/ts/core/engine/plugin.d.ts +59 -0
- package/target/main/ts/core/engine/plugin.js +4 -0
- package/target/main/ts/core/engine/report-products.d.ts +16 -0
- package/target/main/ts/core/engine/report-products.js +86 -0
- package/target/main/ts/core/model/changes.d.ts +8 -0
- package/target/main/ts/core/model/changes.js +2 -0
- package/target/main/ts/core/model/churn.d.ts +11 -0
- package/target/main/ts/core/model/churn.js +5 -0
- package/target/main/ts/core/model/clone-source.d.ts +16 -0
- package/target/main/ts/core/model/clone-source.js +15 -0
- package/target/main/ts/core/model/code-structure.d.ts +30 -0
- package/target/main/ts/core/model/code-structure.js +32 -0
- package/target/main/ts/core/model/comparison.d.ts +24 -0
- package/target/main/ts/core/model/comparison.js +1 -0
- package/target/main/ts/core/model/diff-coverage.d.ts +23 -0
- package/target/main/ts/core/model/diff-coverage.js +1 -0
- package/target/main/ts/core/model/finding-ignore.d.ts +8 -0
- package/target/main/ts/core/model/finding-ignore.js +36 -0
- package/target/main/ts/core/model/finding.d.ts +28 -0
- package/target/main/ts/core/model/finding.js +29 -0
- package/target/main/ts/core/model/ignore-rule.d.ts +11 -0
- package/target/main/ts/core/model/ignore-rule.js +1 -0
- package/target/main/ts/core/model/measurement.d.ts +33 -0
- package/target/main/ts/core/model/measurement.js +30 -0
- package/target/main/ts/core/model/metric-descriptor.d.ts +17 -0
- package/target/main/ts/core/model/metric-descriptor.js +1 -0
- package/target/main/ts/core/model/plugin-data.d.ts +25 -0
- package/target/main/ts/core/model/plugin-data.js +1 -0
- package/target/main/ts/core/model/pull-review.d.ts +48 -0
- package/target/main/ts/core/model/pull-review.js +1 -0
- package/target/main/ts/core/model/quality-summary.d.ts +42 -0
- package/target/main/ts/core/model/quality-summary.js +64 -0
- package/target/main/ts/core/model/report.d.ts +40 -0
- package/target/main/ts/core/model/report.js +5 -0
- package/target/main/ts/core/model/scanner-import.d.ts +39 -0
- package/target/main/ts/core/model/scanner-import.js +29 -0
- package/target/main/ts/core/model/snapshot.d.ts +15 -0
- package/target/main/ts/core/model/snapshot.js +51 -0
- package/target/main/ts/core/model/source-locator.d.ts +7 -0
- package/target/main/ts/core/model/source-locator.js +1 -0
- package/target/main/ts/core/model/source.d.ts +23 -0
- package/target/main/ts/core/model/source.js +1 -0
- package/target/main/ts/core/ports/report.d.ts +9 -0
- package/target/main/ts/core/ports/report.js +2 -0
- package/target/main/ts/core/ports/source-provider.d.ts +14 -0
- package/target/main/ts/core/ports/source-provider.js +5 -0
- package/target/main/ts/core/profile/exclusions.d.ts +11 -0
- package/target/main/ts/core/profile/exclusions.js +58 -0
- package/target/main/ts/core/profile/maintainability.d.ts +31 -0
- package/target/main/ts/core/profile/maintainability.js +10 -0
- package/target/main/ts/core/profile/profile.d.ts +4 -0
- package/target/main/ts/core/profile/profile.js +11 -0
- package/target/main/ts/core/usecases/compare.d.ts +6 -0
- package/target/main/ts/core/usecases/compare.js +146 -0
- package/target/main/ts/core/usecases/diff-coverage-policy.d.ts +6 -0
- package/target/main/ts/core/usecases/diff-coverage-policy.js +11 -0
- package/target/main/ts/core/usecases/diff-coverage.d.ts +40 -0
- package/target/main/ts/core/usecases/diff-coverage.js +16 -0
- package/target/main/ts/core/usecases/inspect.d.ts +38 -0
- package/target/main/ts/core/usecases/inspect.js +42 -0
- package/target/main/ts/core/usecases/review.d.ts +31 -0
- package/target/main/ts/core/usecases/review.js +129 -0
- package/target/main/ts/index.d.ts +35 -0
- package/target/main/ts/index.js +18 -0
- package/target/main/ts/plugin.d.ts +14 -0
- package/target/main/ts/plugin.js +6 -0
- package/target/main/ts/plugins/coverage/coverage.d.ts +25 -0
- package/target/main/ts/plugins/coverage/coverage.js +199 -0
- package/target/main/ts/plugins/coverage/diff-coverage.d.ts +7 -0
- package/target/main/ts/plugins/coverage/diff-coverage.js +90 -0
- package/target/main/ts/plugins/duplication/duplication.d.ts +4 -0
- package/target/main/ts/plugins/duplication/duplication.js +94 -0
- package/target/main/ts/plugins/language-js/babel-provider.d.ts +10 -0
- package/target/main/ts/plugins/language-js/babel-provider.js +47 -0
- package/target/main/ts/plugins/language-js/clone-candidates.d.ts +3 -0
- package/target/main/ts/plugins/language-js/clone-candidates.js +65 -0
- package/target/main/ts/plugins/language-js/code-lines.d.ts +6 -0
- package/target/main/ts/plugins/language-js/code-lines.js +36 -0
- package/target/main/ts/plugins/language-js/function-facts.d.ts +8 -0
- package/target/main/ts/plugins/language-js/function-facts.js +61 -0
- package/target/main/ts/plugins/language-js/structural-observations.d.ts +8 -0
- package/target/main/ts/plugins/language-js/structural-observations.js +80 -0
- package/target/main/ts/plugins/maintainability/maintainability.d.ts +9 -0
- package/target/main/ts/plugins/maintainability/maintainability.js +43 -0
- package/target/main/ts/plugins/maintainability/structural-smells.d.ts +3 -0
- package/target/main/ts/plugins/maintainability/structural-smells.js +16 -0
- package/target/main/ts/plugins/source/forges.d.ts +4 -0
- package/target/main/ts/plugins/source/forges.js +80 -0
- package/target/main/ts/plugins/structure/structure.d.ts +2 -0
- package/target/main/ts/plugins/structure/structure.js +38 -0
- package/target/main/ts/report/html/app/viewer-chart.d.ts +101 -0
- package/target/main/ts/report/html/app/viewer-chart.js +711 -0
- package/target/main/ts/report/html/app/viewer-commits.d.ts +36 -0
- package/target/main/ts/report/html/app/viewer-commits.js +280 -0
- package/target/main/ts/report/html/app/viewer-data.d.ts +23 -0
- package/target/main/ts/report/html/app/viewer-data.js +105 -0
- package/target/main/ts/report/html/app/viewer-files.d.ts +117 -0
- package/target/main/ts/report/html/app/viewer-files.js +2104 -0
- package/target/main/ts/report/html/app/viewer-filter.d.ts +113 -0
- package/target/main/ts/report/html/app/viewer-filter.js +492 -0
- package/target/main/ts/report/html/app/viewer-metric-registry.d.ts +70 -0
- package/target/main/ts/report/html/app/viewer-metric-registry.js +224 -0
- package/target/main/ts/report/html/app/viewer-metrics.d.ts +44 -0
- package/target/main/ts/report/html/app/viewer-metrics.js +172 -0
- package/target/main/ts/report/html/app/viewer-profile.d.ts +17 -0
- package/target/main/ts/report/html/app/viewer-profile.js +401 -0
- package/target/main/ts/report/html/app/viewer-projects.d.ts +1 -0
- package/target/main/ts/report/html/app/viewer-projects.js +90 -0
- package/target/main/ts/report/html/app/viewer-pulls.d.ts +3 -0
- package/target/main/ts/report/html/app/viewer-pulls.js +242 -0
- package/target/main/ts/report/html/app/viewer-source.d.ts +75 -0
- package/target/main/ts/report/html/app/viewer-source.js +313 -0
- package/target/main/ts/report/html/app/viewer-trends.d.ts +73 -0
- package/target/main/ts/report/html/app/viewer-trends.js +423 -0
- package/target/main/ts/report/html/app/viewer.d.ts +1 -0
- package/target/main/ts/report/html/app/viewer.js +735 -0
- package/target/main/ts/report/html/site/badges.d.ts +14 -0
- package/target/main/ts/report/html/site/badges.js +40 -0
- package/target/main/ts/report/html/site/export-site.d.ts +22 -0
- package/target/main/ts/report/html/site/export-site.js +150 -0
- package/target/main/ts/report/html/site/exported-server.d.ts +6 -0
- package/target/main/ts/report/html/site/exported-server.js +71 -0
- package/target/main/ts/report/html/site/local-server.d.ts +7 -0
- package/target/main/ts/report/html/site/local-server.js +65 -0
- package/target/main/ts/report/html/site/projects.d.ts +3 -0
- package/target/main/ts/report/html/site/projects.js +80 -0
- package/target/main/ts/report/html/site/server.d.ts +4 -0
- package/target/main/ts/report/html/site/server.js +65 -0
- package/target/main/ts/report/html/site/source-route.d.ts +6 -0
- package/target/main/ts/report/html/site/source-route.js +23 -0
- package/target/main/ts/report/json/projections/commit-summary.d.ts +12 -0
- package/target/main/ts/report/json/projections/commit-summary.js +124 -0
- package/target/main/ts/report/json/projections/components.d.ts +4 -0
- package/target/main/ts/report/json/projections/components.js +30 -0
- package/target/main/ts/report/json/projections/file-metrics.d.ts +5 -0
- package/target/main/ts/report/json/projections/file-metrics.js +244 -0
- package/target/main/ts/report/json/projections/inspection-context.d.ts +6 -0
- package/target/main/ts/report/json/projections/inspection-context.js +93 -0
- package/target/main/ts/report/json/projections/inspection-details.d.ts +11 -0
- package/target/main/ts/report/json/projections/inspection-details.js +70 -0
- package/target/main/ts/report/json/projections/metric-values.d.ts +7 -0
- package/target/main/ts/report/json/projections/metric-values.js +58 -0
- package/target/main/ts/report/json/projections/public-history.d.ts +4 -0
- package/target/main/ts/report/json/projections/public-history.js +17 -0
- package/target/main/ts/report/json/store/components.d.ts +2 -0
- package/target/main/ts/report/json/store/components.js +32 -0
- package/target/main/ts/report/json/store/local-store.d.ts +13 -0
- package/target/main/ts/report/json/store/local-store.js +180 -0
- package/target/main/ts/report/json/store/pull-review-store.d.ts +3 -0
- package/target/main/ts/report/json/store/pull-review-store.js +52 -0
- package/target/main/ts/report/json/validation/metabranch.d.ts +4 -0
- package/target/main/ts/report/json/validation/metabranch.js +8 -0
- package/target/main/ts/report/json/validation/report.d.ts +15 -0
- package/target/main/ts/report/json/validation/report.js +65 -0
- package/target/main/ts/report/json/validation/summary-validation.d.ts +4 -0
- package/target/main/ts/report/json/validation/summary-validation.js +28 -0
- package/target/main/ts/report/json/wire/compact-json.d.ts +11 -0
- package/target/main/ts/report/json/wire/compact-json.js +76 -0
- package/target/main/ts/report/json/wire/component-model.d.ts +9 -0
- package/target/main/ts/report/json/wire/component-model.js +1 -0
- package/target/main/ts/report/json/wire/domain-types.d.ts +2 -0
- package/target/main/ts/report/json/wire/domain-types.js +1 -0
- package/target/main/ts/report/json/wire/file-metrics-model.d.ts +77 -0
- package/target/main/ts/report/json/wire/file-metrics-model.js +1 -0
- package/target/main/ts/report/json/wire/inspection-context-model.d.ts +26 -0
- package/target/main/ts/report/json/wire/inspection-context-model.js +1 -0
- package/target/main/ts/report/json/wire/inspection-details-model.d.ts +82 -0
- package/target/main/ts/report/json/wire/inspection-details-model.js +1 -0
- package/target/main/ts/report/json/wire/project-model.d.ts +7 -0
- package/target/main/ts/report/json/wire/project-model.js +1 -0
- package/target/main/ts/report/json/wire/public-history-model.d.ts +42 -0
- package/target/main/ts/report/json/wire/public-history-model.js +6 -0
- package/target/main/ts/report/json/wire/pull-review-model.d.ts +7 -0
- package/target/main/ts/report/json/wire/pull-review-model.js +1 -0
- package/target/main/ts/report/json/wire/summary-model.d.ts +45 -0
- package/target/main/ts/report/json/wire/summary-model.js +1 -0
- package/target/main/ts/report.d.ts +11 -0
- package/target/main/ts/report.js +6 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:public-history:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "reports"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:public-history:1" },
|
|
8
|
+
"reports": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["sha", "generatedAt", "status", "files", "parsed", "lines", "functions", "maxComplexity", "lineCoverage"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"sha": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" },
|
|
15
|
+
"generatedAt": { "type": "string" },
|
|
16
|
+
"committedAt": { "type": "string" },
|
|
17
|
+
"subject": { "type": "string" },
|
|
18
|
+
"author": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["name"],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": { "name": { "type": "string" }, "email": { "type": "string" } }
|
|
23
|
+
},
|
|
24
|
+
"tags": { "type": "array", "items": { "type": "string" } },
|
|
25
|
+
"status": { "enum": ["complete", "partial", "not-applicable"] },
|
|
26
|
+
"files": { "$ref": "#/$defs/count" },
|
|
27
|
+
"parsed": { "$ref": "#/$defs/count" },
|
|
28
|
+
"lines": { "$ref": "#/$defs/countOrMissing" },
|
|
29
|
+
"functions": { "$ref": "#/$defs/countOrMissing" },
|
|
30
|
+
"maxComplexity": { "$ref": "#/$defs/countOrMissing" },
|
|
31
|
+
"lineCoverage": {
|
|
32
|
+
"type": ["object", "null"],
|
|
33
|
+
"required": ["covered", "total"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"covered": { "$ref": "#/$defs/count" },
|
|
36
|
+
"total": { "type": "integer", "minimum": 1 }
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"$defs": {
|
|
47
|
+
"count": { "type": "integer", "minimum": 0 },
|
|
48
|
+
"countOrMissing": { "type": ["integer", "null"], "minimum": 0 }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:pull-review:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "number", "generatedAt", "base", "mergeBase", "head", "coverage", "diff", "findings"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:pull-review:1" },
|
|
8
|
+
"number": { "type": ["integer", "null"], "minimum": 1, "maximum": 9007199254740991 },
|
|
9
|
+
"generatedAt": { "type": "string" },
|
|
10
|
+
"base": { "$ref": "urn:repometry:schema:diff-coverage:1#/$defs/sha" },
|
|
11
|
+
"mergeBase": { "$ref": "urn:repometry:schema:diff-coverage:1#/$defs/sha" },
|
|
12
|
+
"head": { "$ref": "urn:repometry:schema:diff-coverage:1#/$defs/sha" },
|
|
13
|
+
"coverage": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["base", "head", "delta", "reason", "gate"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"base": { "$ref": "#/$defs/optionalObservation" },
|
|
18
|
+
"head": { "$ref": "#/$defs/optionalObservation" },
|
|
19
|
+
"delta": { "type": ["number", "null"], "minimum": -100, "maximum": 100 },
|
|
20
|
+
"reason": { "enum": [null, "observations-unavailable", "source-scope-unknown", "source-scope-changed", "method-unknown", "method-changed", "reports-unavailable", "head-coverage-changed"] },
|
|
21
|
+
"gate": {
|
|
22
|
+
"type": ["object", "null"],
|
|
23
|
+
"required": ["status", "maxDrop"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"status": { "$ref": "#/$defs/gateStatus" },
|
|
26
|
+
"maxDrop": { "$ref": "urn:repometry:schema:diff-coverage:1#/$defs/percent" }
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
},
|
|
33
|
+
"diff": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["status", "covered", "total", "percent", "files", "gaps", "excludedPaths", "coverageInputDigest", "uncovered", "gate"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"status": { "enum": ["complete", "partial", "not-applicable", "unavailable"] },
|
|
38
|
+
"covered": { "$ref": "urn:repometry:schema:report:1#/$defs/count" },
|
|
39
|
+
"total": { "$ref": "urn:repometry:schema:report:1#/$defs/count" },
|
|
40
|
+
"percent": { "$ref": "urn:repometry:schema:diff-coverage:1#/properties/percent" },
|
|
41
|
+
"files": { "$ref": "urn:repometry:schema:diff-coverage:1#/properties/files" },
|
|
42
|
+
"gaps": { "$ref": "urn:repometry:schema:diff-coverage:1#/properties/gaps" },
|
|
43
|
+
"excludedPaths": { "type": ["array", "null"], "items": { "type": "string" } },
|
|
44
|
+
"coverageInputDigest": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
|
|
45
|
+
"uncovered": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["path", "lines"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"path": { "type": "string", "minLength": 1 },
|
|
52
|
+
"lines": { "type": "array", "minItems": 1, "items": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }
|
|
53
|
+
},
|
|
54
|
+
"additionalProperties": false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"gate": {
|
|
58
|
+
"type": ["object", "null"],
|
|
59
|
+
"required": ["status", "minimumPercent", "minimumLines"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"status": { "$ref": "#/$defs/gateStatus" },
|
|
62
|
+
"minimumPercent": { "$ref": "urn:repometry:schema:diff-coverage:1#/$defs/percent" },
|
|
63
|
+
"minimumLines": { "$ref": "urn:repometry:schema:report:1#/$defs/count" }
|
|
64
|
+
},
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
},
|
|
70
|
+
"findings": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"required": ["added", "qualityCount", "reason", "gate"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"added": { "type": ["array", "null"], "items": { "$ref": "urn:repometry:schema:report:2#/$defs/finding" } },
|
|
75
|
+
"qualityCount": { "anyOf": [{ "type": "null" }, { "$ref": "urn:repometry:schema:report:1#/$defs/count" }] },
|
|
76
|
+
"reason": { "enum": [null, "reports-unavailable", "findings-unavailable", "partial-inspection", "analysis-changed"] },
|
|
77
|
+
"gate": {
|
|
78
|
+
"type": ["object", "null"],
|
|
79
|
+
"required": ["status", "maximum"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"status": { "$ref": "#/$defs/gateStatus" },
|
|
82
|
+
"maximum": { "$ref": "urn:repometry:schema:report:1#/$defs/count" }
|
|
83
|
+
},
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"$defs": {
|
|
92
|
+
"gateStatus": { "enum": ["passed", "failed", "not-applicable", "indeterminate"] },
|
|
93
|
+
"optionalObservation": {
|
|
94
|
+
"anyOf": [{ "type": "null" }, { "$ref": "urn:repometry:schema:comparison:1#/$defs/observation" }]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:quality-history:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "reports"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:quality-history:1" },
|
|
8
|
+
"reports": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"patternProperties": { "^(?:[a-f0-9]{40}|[a-f0-9]{64})$": { "$ref": "#/$defs/quality" } },
|
|
11
|
+
"additionalProperties": false
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"$defs": {
|
|
16
|
+
"count": { "type": ["integer", "null"], "minimum": 0 },
|
|
17
|
+
"ratio": { "type": ["number", "null"], "minimum": 0 },
|
|
18
|
+
"quality": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["codeLines", "comments", "classes", "cognitiveComplexity", "duplication", "maintainability"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"codeLines": { "$ref": "#/$defs/count" },
|
|
23
|
+
"comments": { "$ref": "#/$defs/count" },
|
|
24
|
+
"classes": { "$ref": "#/$defs/count" },
|
|
25
|
+
"cognitiveComplexity": { "$ref": "#/$defs/count" },
|
|
26
|
+
"duplication": {
|
|
27
|
+
"type": ["object", "null"],
|
|
28
|
+
"required": ["duplicatedLines", "codeLines", "ratio"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"duplicatedLines": { "type": "integer", "minimum": 0 },
|
|
31
|
+
"codeLines": { "type": "integer", "minimum": 0 },
|
|
32
|
+
"ratio": { "type": ["number", "null"], "minimum": 0, "maximum": 1 }
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
},
|
|
36
|
+
"maintainability": {
|
|
37
|
+
"type": ["object", "null"],
|
|
38
|
+
"required": ["smells", "effortMinutes", "debtRatio", "grade"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"smells": { "type": "integer", "minimum": 0 },
|
|
41
|
+
"effortMinutes": { "type": "integer", "minimum": 0 },
|
|
42
|
+
"debtRatio": { "$ref": "#/$defs/ratio" },
|
|
43
|
+
"grade": { "enum": ["A", "B", "C", "D", "F", null] }
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:report:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "subject", "generatedAt", "appliedConfig", "definitions", "scope", "status", "measurements", "diagnostics"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:report:1" },
|
|
8
|
+
"subject": { "$ref": "#/$defs/subject" },
|
|
9
|
+
"generatedAt": { "type": "string" },
|
|
10
|
+
"appliedConfig": { "type": "object", "minProperties": 1 },
|
|
11
|
+
"definitions": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
12
|
+
"scope": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["files", "parsed"],
|
|
15
|
+
"properties": { "files": { "$ref": "#/$defs/count" }, "parsed": { "$ref": "#/$defs/count" } },
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
},
|
|
18
|
+
"status": { "enum": ["complete", "partial", "not-applicable"] },
|
|
19
|
+
"measurements": { "type": "array", "items": { "$ref": "#/$defs/measurement" } },
|
|
20
|
+
"diagnostics": { "type": "array", "items": { "$ref": "#/$defs/diagnostic" } }
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"$defs": {
|
|
24
|
+
"count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
25
|
+
"subject": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"required": ["kind", "id"],
|
|
28
|
+
"properties": { "kind": { "enum": ["commit", "working-tree"] }, "id": { "type": "string" } },
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"if": { "properties": { "kind": { "const": "commit" } } },
|
|
31
|
+
"then": { "properties": { "id": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" } } },
|
|
32
|
+
"else": { "properties": { "id": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } }
|
|
33
|
+
},
|
|
34
|
+
"measurement": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["definition", "target", "value"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"definition": { "type": "string", "minLength": 1 },
|
|
39
|
+
"target": { "enum": ["repository", "file", "function"] },
|
|
40
|
+
"value": { "type": ["number", "null"] },
|
|
41
|
+
"path": { "type": "string", "minLength": 1 },
|
|
42
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
43
|
+
"column": { "type": "integer", "minimum": 1 },
|
|
44
|
+
"name": { "type": "string" },
|
|
45
|
+
"covered": { "$ref": "#/$defs/count" },
|
|
46
|
+
"total": { "$ref": "#/$defs/count" }
|
|
47
|
+
},
|
|
48
|
+
"dependentRequired": { "covered": ["total"], "total": ["covered"], "line": ["path"], "column": ["line"] },
|
|
49
|
+
"if": { "properties": { "target": { "enum": ["file", "function"] } } },
|
|
50
|
+
"then": { "required": ["path"] },
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
},
|
|
53
|
+
"diagnostic": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"required": ["operation", "state", "message"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"operation": { "type": "string" },
|
|
58
|
+
"state": { "enum": ["failed", "blocked", "partial"] },
|
|
59
|
+
"path": { "type": "string" },
|
|
60
|
+
"message": { "type": "string" }
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:report:2",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schema",
|
|
7
|
+
"subject",
|
|
8
|
+
"generatedAt",
|
|
9
|
+
"appliedConfig",
|
|
10
|
+
"definitions",
|
|
11
|
+
"scope",
|
|
12
|
+
"status",
|
|
13
|
+
"measurements",
|
|
14
|
+
"diagnostics"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schema": {
|
|
18
|
+
"const": "urn:repometry:schema:report:2"
|
|
19
|
+
},
|
|
20
|
+
"subject": {
|
|
21
|
+
"$ref": "urn:repometry:schema:report:1#/properties/subject"
|
|
22
|
+
},
|
|
23
|
+
"generatedAt": {
|
|
24
|
+
"$ref": "urn:repometry:schema:report:1#/properties/generatedAt"
|
|
25
|
+
},
|
|
26
|
+
"committedAt": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"commit": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["subject", "author"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"subject": { "type": "string" },
|
|
34
|
+
"author": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["name", "email"],
|
|
37
|
+
"properties": { "name": { "type": "string" }, "email": { "type": "string" } },
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
},
|
|
43
|
+
"appliedConfig": {
|
|
44
|
+
"$ref": "urn:repometry:schema:report:1#/properties/appliedConfig"
|
|
45
|
+
},
|
|
46
|
+
"definitions": {
|
|
47
|
+
"$ref": "urn:repometry:schema:report:1#/properties/definitions"
|
|
48
|
+
},
|
|
49
|
+
"scope": {
|
|
50
|
+
"$ref": "urn:repometry:schema:report:1#/properties/scope"
|
|
51
|
+
},
|
|
52
|
+
"status": {
|
|
53
|
+
"$ref": "urn:repometry:schema:report:1#/properties/status"
|
|
54
|
+
},
|
|
55
|
+
"measurements": {
|
|
56
|
+
"$ref": "urn:repometry:schema:report:1#/properties/measurements"
|
|
57
|
+
},
|
|
58
|
+
"diagnostics": {
|
|
59
|
+
"$ref": "urn:repometry:schema:report:1#/properties/diagnostics"
|
|
60
|
+
},
|
|
61
|
+
"findings": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"$ref": "#/$defs/finding"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"pluginData": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": ["metrics", "measured", "rules", "products"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"metrics": { "$ref": "urn:repometry:schema:metric-catalog:1" },
|
|
72
|
+
"measured": { "type": "array", "uniqueItems": true, "items": { "type": "string" } },
|
|
73
|
+
"privateMetrics": { "type": "array", "uniqueItems": true, "items": { "type": "string" } },
|
|
74
|
+
"rules": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["plugin", "rules"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"plugin": { "type": "string" },
|
|
81
|
+
"rules": { "type": "array", "items": { "$ref": "#/$defs/pluginRule" } }
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"inventory": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"required": ["path", "lines", "language", "analysed"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"path": { "type": "string" },
|
|
93
|
+
"lines": { "type": ["integer", "null"], "minimum": 0 },
|
|
94
|
+
"bytes": { "type": "integer", "minimum": 0 },
|
|
95
|
+
"language": { "type": "string" },
|
|
96
|
+
"analysed": { "type": "boolean" }
|
|
97
|
+
},
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"contracts": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": { "anyOf": [{ "type": "object" }, { "type": "boolean" }] }
|
|
104
|
+
},
|
|
105
|
+
"products": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"required": ["operation", "value"],
|
|
112
|
+
"properties": { "operation": { "type": "string" }, "path": { "type": "string" }, "value": true },
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
"ignoredFindings": {
|
|
121
|
+
"type": "array",
|
|
122
|
+
"items": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"required": ["finding", "matchedRule"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"finding": { "$ref": "#/$defs/finding" },
|
|
127
|
+
"matchedRule": { "$ref": "#/$defs/count" }
|
|
128
|
+
},
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"$defs": {
|
|
135
|
+
"pluginRule": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": ["id", "category"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"id": { "type": "string" },
|
|
140
|
+
"category": { "type": "string" },
|
|
141
|
+
"description": { "type": "string" },
|
|
142
|
+
"defaults": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": { "limit": { "type": "number" }, "cost": { "type": "number" } },
|
|
145
|
+
"additionalProperties": false
|
|
146
|
+
},
|
|
147
|
+
"measure": { "type": "string" },
|
|
148
|
+
"per": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "string" } }
|
|
149
|
+
},
|
|
150
|
+
"additionalProperties": false
|
|
151
|
+
},
|
|
152
|
+
"finding": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"required": [
|
|
155
|
+
"tool",
|
|
156
|
+
"rule",
|
|
157
|
+
"category",
|
|
158
|
+
"level",
|
|
159
|
+
"message"
|
|
160
|
+
],
|
|
161
|
+
"properties": {
|
|
162
|
+
"tool": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"minLength": 1
|
|
165
|
+
},
|
|
166
|
+
"rule": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"minLength": 1
|
|
169
|
+
},
|
|
170
|
+
"category": {
|
|
171
|
+
"enum": [
|
|
172
|
+
"structure",
|
|
173
|
+
"duplication",
|
|
174
|
+
"lint",
|
|
175
|
+
"security",
|
|
176
|
+
"dependency",
|
|
177
|
+
"secret",
|
|
178
|
+
"infrastructure"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"level": {
|
|
182
|
+
"enum": [
|
|
183
|
+
"low",
|
|
184
|
+
"medium",
|
|
185
|
+
"high",
|
|
186
|
+
"unknown"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"message": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 1
|
|
192
|
+
},
|
|
193
|
+
"path": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"minLength": 1
|
|
196
|
+
},
|
|
197
|
+
"line": {
|
|
198
|
+
"type": "integer",
|
|
199
|
+
"minimum": 1
|
|
200
|
+
},
|
|
201
|
+
"endLine": {
|
|
202
|
+
"type": "integer",
|
|
203
|
+
"minimum": 1
|
|
204
|
+
},
|
|
205
|
+
"effortMinutes": {
|
|
206
|
+
"$ref": "#/$defs/count"
|
|
207
|
+
},
|
|
208
|
+
"related": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"items": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"required": [
|
|
213
|
+
"path",
|
|
214
|
+
"line",
|
|
215
|
+
"endLine"
|
|
216
|
+
],
|
|
217
|
+
"properties": {
|
|
218
|
+
"path": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"minLength": 1
|
|
221
|
+
},
|
|
222
|
+
"line": {
|
|
223
|
+
"type": "integer",
|
|
224
|
+
"minimum": 1
|
|
225
|
+
},
|
|
226
|
+
"endLine": {
|
|
227
|
+
"type": "integer",
|
|
228
|
+
"minimum": 1
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"additionalProperties": false
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"dependentRequired": {
|
|
236
|
+
"line": [
|
|
237
|
+
"path"
|
|
238
|
+
],
|
|
239
|
+
"endLine": [
|
|
240
|
+
"line"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"additionalProperties": false
|
|
244
|
+
},
|
|
245
|
+
"count": {
|
|
246
|
+
"$ref": "urn:repometry:schema:report:1#/$defs/count"
|
|
247
|
+
},
|
|
248
|
+
"subject": {
|
|
249
|
+
"$ref": "urn:repometry:schema:report:1#/$defs/subject"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|