repometry 0.0.0-stage → 0.1.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 +27 -2
- package/package.json +63 -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 +34 -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 +238 -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 +130 -0
- package/target/main/resources/viewer/projects.html +52 -0
- package/target/main/resources/viewer/styles.css +586 -0
- package/target/main/resources/viewer/viewer-pulls.css +64 -0
- package/target/main/ts/api/gh/github-pr-comment.d.ts +4 -0
- package/target/main/ts/api/gh/github-pr-comment.js +107 -0
- package/target/main/ts/api/gh/github.d.ts +6 -0
- package/target/main/ts/api/gh/github.js +91 -0
- package/target/main/ts/api/git/blob-batch.d.ts +10 -0
- package/target/main/ts/api/git/blob-batch.js +105 -0
- package/target/main/ts/api/git/changes.d.ts +22 -0
- package/target/main/ts/api/git/changes.js +107 -0
- package/target/main/ts/api/git/commit-metadata.d.ts +3 -0
- package/target/main/ts/api/git/commit-metadata.js +54 -0
- package/target/main/ts/api/git/git-churn.d.ts +9 -0
- package/target/main/ts/api/git/git-churn.js +70 -0
- package/target/main/ts/api/git/git-reader.d.ts +16 -0
- package/target/main/ts/api/git/git-reader.js +73 -0
- package/target/main/ts/api/git/git.d.ts +21 -0
- package/target/main/ts/api/git/git.js +152 -0
- package/target/main/ts/api/git/inspection-source.d.ts +15 -0
- package/target/main/ts/api/git/inspection-source.js +30 -0
- package/target/main/ts/api/git/local-sources.d.ts +5 -0
- package/target/main/ts/api/git/local-sources.js +46 -0
- package/target/main/ts/api/git/local.d.ts +3 -0
- package/target/main/ts/api/git/local.js +35 -0
- package/target/main/ts/api/git/metabranch-worktree.d.ts +1 -0
- package/target/main/ts/api/git/metabranch-worktree.js +34 -0
- package/target/main/ts/api/git/source-cache.d.ts +3 -0
- package/target/main/ts/api/git/source-cache.js +56 -0
- package/target/main/ts/api/import/finding-import.d.ts +9 -0
- package/target/main/ts/api/import/finding-import.js +226 -0
- package/target/main/ts/api/import/lcov-files.d.ts +5 -0
- package/target/main/ts/api/import/lcov-files.js +13 -0
- package/target/main/ts/api/import/profile-file.d.ts +4 -0
- package/target/main/ts/api/import/profile-file.js +16 -0
- package/target/main/ts/api/worker/remote-executor.d.ts +2 -0
- package/target/main/ts/api/worker/remote-executor.js +45 -0
- package/target/main/ts/api/worker/worker-protocol.d.ts +7 -0
- package/target/main/ts/api/worker/worker-protocol.js +101 -0
- package/target/main/ts/api/worker/worker.d.ts +5 -0
- package/target/main/ts/api/worker/worker.js +85 -0
- package/target/main/ts/cli/arguments.d.ts +28 -0
- package/target/main/ts/cli/arguments.js +110 -0
- package/target/main/ts/cli/config.d.ts +14 -0
- package/target/main/ts/cli/config.js +60 -0
- package/target/main/ts/cli/github-pr-comment.d.ts +1 -0
- package/target/main/ts/cli/github-pr-comment.js +12 -0
- package/target/main/ts/cli/imports.d.ts +7 -0
- package/target/main/ts/cli/imports.js +29 -0
- package/target/main/ts/cli/main.d.ts +2 -0
- package/target/main/ts/cli/main.js +378 -0
- package/target/main/ts/cli/reporting.d.ts +18 -0
- package/target/main/ts/cli/reporting.js +108 -0
- package/target/main/ts/cli/revisions.d.ts +6 -0
- package/target/main/ts/cli/revisions.js +15 -0
- package/target/main/ts/cli/store.d.ts +13 -0
- package/target/main/ts/cli/store.js +38 -0
- package/target/main/ts/compose/analyze-snapshot.d.ts +4 -0
- package/target/main/ts/compose/analyze-snapshot.js +163 -0
- package/target/main/ts/compose/attach-churn.d.ts +2 -0
- package/target/main/ts/compose/attach-churn.js +37 -0
- package/target/main/ts/compose/diff-coverage.d.ts +20 -0
- package/target/main/ts/compose/diff-coverage.js +56 -0
- package/target/main/ts/compose/inspect.d.ts +23 -0
- package/target/main/ts/compose/inspect.js +44 -0
- package/target/main/ts/compose/plugin-list.d.ts +6 -0
- package/target/main/ts/compose/plugin-list.js +9 -0
- package/target/main/ts/compose/prepare-metabranch.d.ts +9 -0
- package/target/main/ts/compose/prepare-metabranch.js +16 -0
- package/target/main/ts/compose/review.d.ts +16 -0
- package/target/main/ts/compose/review.js +38 -0
- package/target/main/ts/compose/sources.d.ts +3 -0
- package/target/main/ts/compose/sources.js +29 -0
- package/target/main/ts/core/engine/execute.d.ts +10 -0
- package/target/main/ts/core/engine/execute.js +49 -0
- package/target/main/ts/core/engine/manifest.d.ts +4 -0
- package/target/main/ts/core/engine/manifest.js +104 -0
- package/target/main/ts/core/engine/plan.d.ts +22 -0
- package/target/main/ts/core/engine/plan.js +106 -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 +85 -0
- package/target/main/ts/core/model/changes.d.ts +8 -0
- package/target/main/ts/core/model/changes.js +1 -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 +14 -0
- package/target/main/ts/core/model/code-structure.d.ts +30 -0
- package/target/main/ts/core/model/code-structure.js +31 -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 +35 -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 +27 -0
- package/target/main/ts/core/model/measurement.js +24 -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 +32 -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 +28 -0
- package/target/main/ts/core/model/snapshot.d.ts +15 -0
- package/target/main/ts/core/model/snapshot.js +50 -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 +1 -0
- package/target/main/ts/core/ports/source-provider.d.ts +14 -0
- package/target/main/ts/core/ports/source-provider.js +4 -0
- package/target/main/ts/core/profile/exclusions.d.ts +11 -0
- package/target/main/ts/core/profile/exclusions.js +57 -0
- package/target/main/ts/core/profile/maintainability.d.ts +31 -0
- package/target/main/ts/core/profile/maintainability.js +9 -0
- package/target/main/ts/core/profile/profile.d.ts +4 -0
- package/target/main/ts/core/profile/profile.js +10 -0
- package/target/main/ts/core/usecases/compare.d.ts +6 -0
- package/target/main/ts/core/usecases/compare.js +145 -0
- package/target/main/ts/core/usecases/diff-coverage-policy.d.ts +6 -0
- package/target/main/ts/core/usecases/diff-coverage-policy.js +10 -0
- package/target/main/ts/core/usecases/diff-coverage.d.ts +40 -0
- package/target/main/ts/core/usecases/diff-coverage.js +15 -0
- package/target/main/ts/core/usecases/inspect.d.ts +38 -0
- package/target/main/ts/core/usecases/inspect.js +41 -0
- package/target/main/ts/core/usecases/review.d.ts +31 -0
- package/target/main/ts/core/usecases/review.js +128 -0
- package/target/main/ts/index.d.ts +35 -0
- package/target/main/ts/index.js +17 -0
- package/target/main/ts/plugin.d.ts +14 -0
- package/target/main/ts/plugin.js +5 -0
- package/target/main/ts/plugins/coverage/coverage.d.ts +23 -0
- package/target/main/ts/plugins/coverage/coverage.js +120 -0
- package/target/main/ts/plugins/coverage/diff-coverage.d.ts +7 -0
- package/target/main/ts/plugins/coverage/diff-coverage.js +89 -0
- package/target/main/ts/plugins/duplication/duplication.d.ts +4 -0
- package/target/main/ts/plugins/duplication/duplication.js +93 -0
- package/target/main/ts/plugins/language-js/babel-provider.d.ts +10 -0
- package/target/main/ts/plugins/language-js/babel-provider.js +46 -0
- package/target/main/ts/plugins/language-js/clone-candidates.d.ts +3 -0
- package/target/main/ts/plugins/language-js/clone-candidates.js +64 -0
- package/target/main/ts/plugins/language-js/code-lines.d.ts +6 -0
- package/target/main/ts/plugins/language-js/code-lines.js +35 -0
- package/target/main/ts/plugins/language-js/function-facts.d.ts +8 -0
- package/target/main/ts/plugins/language-js/function-facts.js +60 -0
- package/target/main/ts/plugins/language-js/structural-observations.d.ts +8 -0
- package/target/main/ts/plugins/language-js/structural-observations.js +79 -0
- package/target/main/ts/plugins/maintainability/maintainability.d.ts +9 -0
- package/target/main/ts/plugins/maintainability/maintainability.js +42 -0
- package/target/main/ts/plugins/maintainability/structural-smells.d.ts +3 -0
- package/target/main/ts/plugins/maintainability/structural-smells.js +15 -0
- package/target/main/ts/plugins/source/forges.d.ts +4 -0
- package/target/main/ts/plugins/source/forges.js +79 -0
- package/target/main/ts/plugins/structure/structure.d.ts +2 -0
- package/target/main/ts/plugins/structure/structure.js +37 -0
- package/target/main/ts/report/html/app/viewer-access.d.ts +19 -0
- package/target/main/ts/report/html/app/viewer-access.js +25 -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 +2087 -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 +68 -0
- package/target/main/ts/report/html/app/viewer-metric-registry.js +206 -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 +74 -0
- package/target/main/ts/report/html/app/viewer-trends.js +413 -0
- package/target/main/ts/report/html/app/viewer.d.ts +1 -0
- package/target/main/ts/report/html/app/viewer.js +794 -0
- package/target/main/ts/report/html/site/badges.d.ts +14 -0
- package/target/main/ts/report/html/site/badges.js +39 -0
- package/target/main/ts/report/html/site/export-site.d.ts +21 -0
- package/target/main/ts/report/html/site/export-site.js +157 -0
- package/target/main/ts/report/html/site/exported-server.d.ts +6 -0
- package/target/main/ts/report/html/site/exported-server.js +70 -0
- package/target/main/ts/report/html/site/local-server.d.ts +7 -0
- package/target/main/ts/report/html/site/local-server.js +64 -0
- package/target/main/ts/report/html/site/projects.d.ts +3 -0
- package/target/main/ts/report/html/site/projects.js +79 -0
- package/target/main/ts/report/html/site/server.d.ts +4 -0
- package/target/main/ts/report/html/site/server.js +64 -0
- package/target/main/ts/report/html/site/source-route.d.ts +6 -0
- package/target/main/ts/report/html/site/source-route.js +22 -0
- package/target/main/ts/report/json/projections/commit-summary.d.ts +11 -0
- package/target/main/ts/report/json/projections/commit-summary.js +118 -0
- package/target/main/ts/report/json/projections/components.d.ts +4 -0
- package/target/main/ts/report/json/projections/components.js +29 -0
- package/target/main/ts/report/json/projections/file-metrics.d.ts +5 -0
- package/target/main/ts/report/json/projections/file-metrics.js +243 -0
- package/target/main/ts/report/json/projections/inspection-context.d.ts +6 -0
- package/target/main/ts/report/json/projections/inspection-context.js +92 -0
- package/target/main/ts/report/json/projections/inspection-details.d.ts +11 -0
- package/target/main/ts/report/json/projections/inspection-details.js +69 -0
- package/target/main/ts/report/json/projections/metric-values.d.ts +7 -0
- package/target/main/ts/report/json/projections/metric-values.js +57 -0
- package/target/main/ts/report/json/projections/public-history.d.ts +4 -0
- package/target/main/ts/report/json/projections/public-history.js +16 -0
- package/target/main/ts/report/json/store/components.d.ts +2 -0
- package/target/main/ts/report/json/store/components.js +31 -0
- package/target/main/ts/report/json/store/local-store.d.ts +13 -0
- package/target/main/ts/report/json/store/local-store.js +179 -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 +51 -0
- package/target/main/ts/report/json/validation/metabranch.d.ts +4 -0
- package/target/main/ts/report/json/validation/metabranch.js +7 -0
- package/target/main/ts/report/json/validation/report.d.ts +15 -0
- package/target/main/ts/report/json/validation/report.js +64 -0
- package/target/main/ts/report/json/validation/summary-validation.d.ts +4 -0
- package/target/main/ts/report/json/validation/summary-validation.js +27 -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 +5 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Idleware
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Repometry
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Track repository metrics without SaaS
|
|
4
|
+
|
|
5
|
+
Git can serve as a project’s single source of truth for code, tests, docs, and CI configuration. Repometry lets you keep coverage and maintainability metrics alongside your code, commit by commit.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
Node.js >= 24
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Run each command in your repository as `npx repometry <command>`.
|
|
14
|
+
|
|
15
|
+
| Command | What it does |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `analyze` | Measures HEAD and saves the inspection under `.repometry/` |
|
|
18
|
+
| `analyze HEAD~50..HEAD` | Measures the last 50 commits, oldest first, to build history. `--skip-saved` leaves commits already saved. |
|
|
19
|
+
| `analyze --import lcov=coverage/lcov.info` | Adds coverage or scanner results from your tools. Repeat `--import` for each file. |
|
|
20
|
+
| `report html` | Writes the public report (history, aggregates, badges) to `.repometry/report/html` |
|
|
21
|
+
| `report html --mode private -o DIR` | Writes the private report, with per-file metrics, findings and source links, to `DIR` |
|
|
22
|
+
| `view` | Serves the report locally on a free port; `--port 3030` picks the port |
|
|
23
|
+
| `plugins` | Lists the import formats, reporters and CI adapters |
|
|
24
|
+
| `help [command]` | Shows the options of a command |
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repometry",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Track repository metrics without SaaS",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/idleware/repometry.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/idleware/repometry#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/idleware/repometry/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"repository",
|
|
16
|
+
"metrics",
|
|
17
|
+
"coverage",
|
|
18
|
+
"maintainability",
|
|
19
|
+
"static-analysis"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=24"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"repometry": "target/main/ts/cli/main.js"
|
|
27
|
+
},
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./target/main/ts/index.d.ts",
|
|
31
|
+
"default": "./target/main/ts/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./plugin": {
|
|
34
|
+
"types": "./target/main/ts/plugin.d.ts",
|
|
35
|
+
"default": "./target/main/ts/plugin.js"
|
|
36
|
+
},
|
|
37
|
+
"./report": {
|
|
38
|
+
"types": "./target/main/ts/report.d.ts",
|
|
39
|
+
"default": "./target/main/ts/report.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"target/main"
|
|
44
|
+
],
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "node -e \"require('node:fs').rmSync('target/main', { recursive: true, force: true })\" && tsc -p tsconfig.json && tsc -p tsconfig.browser.json && node -e \"const fs = require('node:fs'); fs.chmodSync('target/main/ts/cli/main.js', 0o755); fs.cpSync('src/main/resources', 'target/main/resources', { recursive: true })\"",
|
|
50
|
+
"test": "npm run build && tsc -p tsconfig.test.json && node --test 'target/verification/test/ts/*.test.js'",
|
|
51
|
+
"coverage": "npm run build && tsc -p tsconfig.json --sourceMap && tsc -p tsconfig.browser.json --sourceMap && tsc -p tsconfig.test.json --sourceMap && c8 --all --src target/main/ts --src target/verification/main/ts --include 'src/main/ts/**' --exclude-after-remap --reporter lcov --reporter text-summary --reports-dir target/coverage node --test 'target/verification/test/ts/*.test.js'",
|
|
52
|
+
"prepack": "npm run build",
|
|
53
|
+
"release": "npx --yes zx-semrel@1.25.1"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@babel/parser": "7.29.15",
|
|
57
|
+
"@babel/types": "7.29.15",
|
|
58
|
+
"ajv": "8.20.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "24.19.2",
|
|
62
|
+
"c8": "12.0.0",
|
|
63
|
+
"typescript": "7.0.2"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:compact-json:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "strings", "shapes", "data"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:compact-json:1" },
|
|
8
|
+
"summary": { "$ref": "urn:repometry:schema:repository-summary:1#/$defs/commit" },
|
|
9
|
+
"strings": { "type": "array", "items": { "type": "string" } },
|
|
10
|
+
"shapes": { "type": "array", "items": { "type": "array", "uniqueItems": true, "items": { "type": "string" } } },
|
|
11
|
+
"data": { "$ref": "#/$defs/node" }
|
|
12
|
+
},
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"$defs": {
|
|
15
|
+
"node": {
|
|
16
|
+
"anyOf": [
|
|
17
|
+
{ "type": "null" },
|
|
18
|
+
{ "type": "number" },
|
|
19
|
+
{ "type": "boolean" },
|
|
20
|
+
{ "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/node" } }
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:comparison:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "baseline", "current", "metrics"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:comparison:1" },
|
|
8
|
+
"baseline": { "$ref": "#/$defs/inspection" },
|
|
9
|
+
"current": { "$ref": "#/$defs/inspection" },
|
|
10
|
+
"metrics": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["physicalLines", "functions", "maxCyclomaticComplexity", "lineCoverage"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"physicalLines": { "$ref": "#/$defs/metric" },
|
|
15
|
+
"functions": { "$ref": "#/$defs/metric" },
|
|
16
|
+
"maxCyclomaticComplexity": { "$ref": "#/$defs/metric" },
|
|
17
|
+
"lineCoverage": { "$ref": "#/$defs/metric" }
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"$defs": {
|
|
24
|
+
"inspection": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["subject", "generatedAt", "status", "scope"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"subject": { "$ref": "urn:repometry:schema:report:1#/$defs/subject" },
|
|
29
|
+
"generatedAt": { "$ref": "urn:repometry:schema:report:1#/properties/generatedAt" },
|
|
30
|
+
"status": { "$ref": "urn:repometry:schema:report:1#/properties/status" },
|
|
31
|
+
"scope": { "$ref": "urn:repometry:schema:report:1#/properties/scope" }
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
35
|
+
"observation": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["status", "value"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"status": { "enum": ["complete", "partial", "not-applicable", "unavailable"] },
|
|
40
|
+
"value": { "type": ["number", "null"], "minimum": 0 },
|
|
41
|
+
"covered": { "$ref": "urn:repometry:schema:report:1#/$defs/count" },
|
|
42
|
+
"total": { "$ref": "urn:repometry:schema:report:1#/$defs/count" }
|
|
43
|
+
},
|
|
44
|
+
"dependentRequired": { "covered": ["total"], "total": ["covered"] },
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
},
|
|
47
|
+
"metric": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["definition", "unit", "baseline", "current", "status", "reason", "delta"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"definition": { "type": "string" },
|
|
52
|
+
"unit": { "enum": ["count", "percent"] },
|
|
53
|
+
"baseline": { "$ref": "#/$defs/observation" },
|
|
54
|
+
"current": { "$ref": "#/$defs/observation" },
|
|
55
|
+
"status": { "enum": ["comparable", "incompatible", "unavailable"] },
|
|
56
|
+
"reason": { "enum": [null, "observations-unavailable", "source-scope-unknown", "source-scope-changed", "method-unknown", "method-changed"] },
|
|
57
|
+
"delta": { "type": ["number", "null"] }
|
|
58
|
+
},
|
|
59
|
+
"if": { "properties": { "status": { "const": "comparable" } } },
|
|
60
|
+
"then": { "properties": { "reason": { "const": null }, "delta": { "type": "number" } } },
|
|
61
|
+
"else": { "properties": { "reason": { "type": "string" }, "delta": { "const": null } } },
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:config:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"$schema": { "type": "string" },
|
|
7
|
+
"exclude": { "$ref": "#/$defs/strings" },
|
|
8
|
+
"ignore": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"tool": { "type": "string", "minLength": 1 },
|
|
14
|
+
"rule": { "type": "string", "minLength": 1 },
|
|
15
|
+
"path": { "type": "string", "minLength": 1 },
|
|
16
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
17
|
+
},
|
|
18
|
+
"anyOf": [{ "required": ["tool"] }, { "required": ["rule"] }, { "required": ["path"] }],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"imports": { "$ref": "#/$defs/strings" },
|
|
23
|
+
"reports": { "$ref": "#/$defs/strings" },
|
|
24
|
+
"mode": { "enum": ["public", "private"] },
|
|
25
|
+
"sources": { "type": "string", "minLength": 1 },
|
|
26
|
+
"branch": { "type": "string", "minLength": 1 },
|
|
27
|
+
"minCoverage": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
28
|
+
"minLines": { "type": "integer", "minimum": 0 },
|
|
29
|
+
"maxCoverageDrop": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
30
|
+
"maxNewIssues": { "type": "integer", "minimum": 0 }
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"$defs": { "strings": { "type": "array", "items": { "type": "string", "minLength": 1 } } }
|
|
34
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:diff-coverage:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "requestedBase", "base", "head", "generatedAt", "appliedConfig", "status", "covered", "total", "percent", "files", "gaps", "decision"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:diff-coverage:1" },
|
|
8
|
+
"requestedBase": { "$ref": "#/$defs/sha" },
|
|
9
|
+
"base": { "$ref": "#/$defs/sha" },
|
|
10
|
+
"head": { "$ref": "#/$defs/sha" },
|
|
11
|
+
"generatedAt": { "type": "string" },
|
|
12
|
+
"appliedConfig": { "type": "object", "minProperties": 1 },
|
|
13
|
+
"status": { "enum": ["complete", "partial", "not-applicable"] },
|
|
14
|
+
"covered": { "$ref": "#/$defs/count" },
|
|
15
|
+
"total": { "$ref": "#/$defs/count" },
|
|
16
|
+
"percent": { "anyOf": [{ "$ref": "#/$defs/percent" }, { "type": "null" }] },
|
|
17
|
+
"files": { "type": "array", "items": { "$ref": "#/$defs/file" } },
|
|
18
|
+
"gaps": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": ["path", "reason"],
|
|
23
|
+
"properties": { "path": { "type": "string" }, "reason": { "type": "string" } },
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"decision": { "anyOf": [{ "$ref": "#/$defs/decision" }, { "type": "null" }] }
|
|
28
|
+
},
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"$defs": {
|
|
31
|
+
"sha": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" },
|
|
32
|
+
"count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
33
|
+
"percent": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
34
|
+
"file": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["path", "addedLines", "covered", "total"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"path": { "type": "string", "minLength": 1 },
|
|
39
|
+
"addedLines": { "$ref": "#/$defs/count" },
|
|
40
|
+
"covered": { "anyOf": [{ "$ref": "#/$defs/count" }, { "type": "null" }] },
|
|
41
|
+
"total": { "anyOf": [{ "$ref": "#/$defs/count" }, { "type": "null" }] }
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
},
|
|
45
|
+
"decision": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["status", "minimumPercent"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"status": { "enum": ["passed", "failed", "indeterminate", "not-applicable"] },
|
|
50
|
+
"minimumPercent": { "$ref": "#/$defs/percent" }
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:file-metrics:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "subject", "generatedAt", "status", "scope", "files", "directories", "unassignedDiagnostics", "hotspots"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "urn:repometry:schema:file-metrics:1" },
|
|
8
|
+
"subject": { "$ref": "urn:repometry:schema:report:1#/$defs/subject" },
|
|
9
|
+
"generatedAt": { "$ref": "urn:repometry:schema:report:1#/properties/generatedAt" },
|
|
10
|
+
"status": { "$ref": "urn:repometry:schema:report:1#/properties/status" },
|
|
11
|
+
"scope": { "$ref": "urn:repometry:schema:report:1#/properties/scope" },
|
|
12
|
+
"files": { "type": "array", "items": { "$ref": "#/$defs/file" } },
|
|
13
|
+
"directories": { "type": "array", "items": { "$ref": "#/$defs/directory" } },
|
|
14
|
+
"languages": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["id", "analysed"],
|
|
19
|
+
"properties": { "id": { "type": "string" }, "label": { "type": "string" }, "analysed": { "type": "boolean" } },
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"catalog": { "$ref": "urn:repometry:schema:metric-catalog:1" },
|
|
24
|
+
"unassignedDiagnostics": { "$ref": "#/$defs/count" },
|
|
25
|
+
"churnWindow": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"required": ["lookbackDays", "maxCommits", "endingAt", "commits", "shallow", "capReached"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"lookbackDays": { "type": "integer", "minimum": 1 },
|
|
30
|
+
"maxCommits": { "type": "integer", "minimum": 1 },
|
|
31
|
+
"endingAt": { "type": "string" },
|
|
32
|
+
"commits": { "$ref": "#/$defs/count" },
|
|
33
|
+
"shallow": { "type": "boolean" },
|
|
34
|
+
"capReached": { "type": "boolean" }
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
},
|
|
38
|
+
"hotspots": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": ["complexity", "missedLines"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"complexity": { "type": "array", "items": { "type": "string" } },
|
|
43
|
+
"missedLines": { "type": "array", "items": { "type": "string" } },
|
|
44
|
+
"cognitive": { "type": "array", "items": { "type": "string" } },
|
|
45
|
+
"duplication": { "type": "array", "items": { "type": "string" } },
|
|
46
|
+
"churn": { "type": "array", "items": { "type": "string" } }
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"$defs": {
|
|
53
|
+
"count": { "$ref": "urn:repometry:schema:report:1#/$defs/count" },
|
|
54
|
+
"optionalCount": { "anyOf": [{ "$ref": "#/$defs/count" }, { "type": "null" }] },
|
|
55
|
+
"observations": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"required": ["path", "lines", "functions", "complexity", "lineCoverage", "diagnosticCount"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"language": { "type": "integer", "minimum": 0 },
|
|
60
|
+
"analysed": { "type": "boolean" },
|
|
61
|
+
"values": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"propertyNames": { "pattern": "^(?:0|[1-9][0-9]*)$" },
|
|
64
|
+
"additionalProperties": { "type": ["number", "null"] }
|
|
65
|
+
},
|
|
66
|
+
"path": { "type": "string" },
|
|
67
|
+
"lines": { "$ref": "#/$defs/optionalCount" },
|
|
68
|
+
"bytes": { "$ref": "#/$defs/count" },
|
|
69
|
+
"functions": { "$ref": "#/$defs/optionalCount" },
|
|
70
|
+
"complexity": {
|
|
71
|
+
"type": ["object", "null"],
|
|
72
|
+
"required": ["sum", "maximum", "measuredFunctions"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"sum": { "$ref": "#/$defs/count" },
|
|
75
|
+
"maximum": { "$ref": "#/$defs/optionalCount" },
|
|
76
|
+
"measuredFunctions": { "$ref": "#/$defs/count" }
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
},
|
|
80
|
+
"lineCoverage": {
|
|
81
|
+
"type": ["object", "null"],
|
|
82
|
+
"required": ["covered", "total"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"covered": { "$ref": "#/$defs/count" },
|
|
85
|
+
"total": { "$ref": "#/$defs/count" }
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
},
|
|
89
|
+
"diagnosticCount": { "$ref": "#/$defs/count" },
|
|
90
|
+
"quality": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"codeLines": { "$ref": "#/$defs/count" },
|
|
94
|
+
"commentLines": { "$ref": "#/$defs/count" },
|
|
95
|
+
"classes": { "$ref": "#/$defs/count" },
|
|
96
|
+
"cognitiveComplexity": { "$ref": "#/$defs/count" },
|
|
97
|
+
"churn": { "$ref": "#/$defs/count" },
|
|
98
|
+
"duplication": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"required": ["duplicatedLines", "codeLines"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"duplicatedLines": { "$ref": "#/$defs/count" },
|
|
103
|
+
"codeLines": { "$ref": "#/$defs/count" }
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
},
|
|
107
|
+
"maintainability": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"required": ["smells", "effortMinutes"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"smells": { "$ref": "#/$defs/count" },
|
|
112
|
+
"effortMinutes": { "$ref": "#/$defs/optionalCount" }
|
|
113
|
+
},
|
|
114
|
+
"additionalProperties": false
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"file": { "type": "object", "allOf": [{ "$ref": "#/$defs/observations" }], "unevaluatedProperties": false },
|
|
122
|
+
"directory": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"allOf": [{ "$ref": "#/$defs/observations" }],
|
|
125
|
+
"required": ["files", "sizeMeasuredFiles", "coverageMeasuredFiles"],
|
|
126
|
+
"properties": {
|
|
127
|
+
"files": { "$ref": "#/$defs/count" },
|
|
128
|
+
"sizeMeasuredFiles": { "$ref": "#/$defs/count" },
|
|
129
|
+
"coverageMeasuredFiles": { "$ref": "#/$defs/count" }
|
|
130
|
+
},
|
|
131
|
+
"unevaluatedProperties": false
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:inspection-context:1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"patternProperties": {
|
|
6
|
+
"^(?:[a-f0-9]{40}|[a-f0-9]{64})$": {
|
|
7
|
+
"$ref": "#/$defs/inspectionContext"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"$defs": {
|
|
12
|
+
"complexFunctions": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"maxItems": 5,
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": [
|
|
18
|
+
"name",
|
|
19
|
+
"path",
|
|
20
|
+
"line",
|
|
21
|
+
"complexity"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"name": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"path": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"line": {
|
|
31
|
+
"type": [
|
|
32
|
+
"integer",
|
|
33
|
+
"null"
|
|
34
|
+
],
|
|
35
|
+
"minimum": 1
|
|
36
|
+
},
|
|
37
|
+
"complexity": {
|
|
38
|
+
"type": "number"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"inspectionContext": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": [
|
|
47
|
+
"exclusions",
|
|
48
|
+
"boundary"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"exclusions": {
|
|
52
|
+
"type": [
|
|
53
|
+
"object",
|
|
54
|
+
"null"
|
|
55
|
+
],
|
|
56
|
+
"required": [
|
|
57
|
+
"paths",
|
|
58
|
+
"directories"
|
|
59
|
+
],
|
|
60
|
+
"properties": {
|
|
61
|
+
"paths": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"directories": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
},
|
|
76
|
+
"boundary": {
|
|
77
|
+
"enum": [
|
|
78
|
+
null,
|
|
79
|
+
"changed",
|
|
80
|
+
"unavailable"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"scanners": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"required": [
|
|
88
|
+
"name",
|
|
89
|
+
"version"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"name": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"version": {
|
|
96
|
+
"type": [
|
|
97
|
+
"string",
|
|
98
|
+
"null"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"additionalProperties": false
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"ignores": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"required": [
|
|
108
|
+
"rules",
|
|
109
|
+
"count"
|
|
110
|
+
],
|
|
111
|
+
"properties": {
|
|
112
|
+
"count": {
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"minimum": 0
|
|
115
|
+
},
|
|
116
|
+
"rules": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"tool": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"rule": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
},
|
|
127
|
+
"path": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"reason": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"additionalProperties": false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"additionalProperties": false
|
|
139
|
+
},
|
|
140
|
+
"security": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"required": [
|
|
143
|
+
"low",
|
|
144
|
+
"medium",
|
|
145
|
+
"high",
|
|
146
|
+
"unknown"
|
|
147
|
+
],
|
|
148
|
+
"properties": {
|
|
149
|
+
"low": {
|
|
150
|
+
"type": "integer",
|
|
151
|
+
"minimum": 0
|
|
152
|
+
},
|
|
153
|
+
"medium": {
|
|
154
|
+
"type": "integer",
|
|
155
|
+
"minimum": 0
|
|
156
|
+
},
|
|
157
|
+
"high": {
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"minimum": 0
|
|
160
|
+
},
|
|
161
|
+
"unknown": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"minimum": 0
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"additionalProperties": false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"additionalProperties": false
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:repometry:schema:metric-catalog:1",
|
|
4
|
+
"type": "array",
|
|
5
|
+
"items": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["id", "label", "unit", "scope", "aggregate", "better"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": { "type": "string", "minLength": 1 },
|
|
10
|
+
"label": { "type": "string", "minLength": 1 },
|
|
11
|
+
"short": { "type": "string", "minLength": 1 },
|
|
12
|
+
"description": { "type": "string", "minLength": 1 },
|
|
13
|
+
"unit": { "enum": ["count", "ratio", "minutes"] },
|
|
14
|
+
"scope": { "enum": ["repository", "file", "function"] },
|
|
15
|
+
"aggregate": { "enum": ["sum", "max", "none"] },
|
|
16
|
+
"ratio": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["of", "over"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"of": { "type": "string", "minLength": 1 },
|
|
21
|
+
"over": { "type": "string", "minLength": 1 }
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
},
|
|
25
|
+
"better": { "enum": ["lower", "higher", "none"] },
|
|
26
|
+
"bands": { "type": "array", "minItems": 4, "maxItems": 4, "items": { "type": "number" } },
|
|
27
|
+
"group": { "type": "string", "minLength": 1 }
|
|
28
|
+
},
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|
|
31
|
+
}
|