From 7d2a9baa7a546eda5d73445f7db09e56884a7580 Mon Sep 17 00:00:00 2001 From: John Pennycook Date: Thu, 21 Mar 2024 10:00:11 -0700 Subject: [PATCH] Update coverage schema to 0.3.0 Now requires file name, a unique ID, and a different line representation. Signed-off-by: John Pennycook --- MANIFEST.in | 3 +- codebasin/schema/coverage-0.2.0.schema | 40 -------------------------- codebasin/util.py | 2 +- 3 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 codebasin/schema/coverage-0.2.0.schema diff --git a/MANIFEST.in b/MANIFEST.in index 3df3cbd..05daea9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,5 @@ include codebasin/schema/analysis.schema include codebasin/schema/compilation-database.schema include codebasin/schema/config.schema -include codebasin/schema/coverage-0.1.0.schema -include codebasin/schema/coverage-0.2.0.schema +include codebasin/schema/coverage-0.3.0.schema include codebasin/schema/cbiconfig.schema diff --git a/codebasin/schema/coverage-0.2.0.schema b/codebasin/schema/coverage-0.2.0.schema deleted file mode 100644 index b0d6266..0000000 --- a/codebasin/schema/coverage-0.2.0.schema +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/intel/p3-analysis-library/main/p3/data/coverage-0.2.0.schema", - "title": "Coverage", - "description": "Lines of code used in each file of a code base.", - "type": "array", - "items": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "path": { - "type": "string" - }, - "regions": { - "type": "array", - "items": { - "type": "array", - "prefixItems": [ - { - "type": "integer" - }, - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "items": false - } - } - }, - "required": [ - "file", - "regions" - ] - } -} diff --git a/codebasin/util.py b/codebasin/util.py index b471dd4..ab9860e 100644 --- a/codebasin/util.py +++ b/codebasin/util.py @@ -143,7 +143,7 @@ def _validate_json(json_object: object, schema_name: str) -> bool: "analysis": "schema/analysis.schema", "compiledb": "schema/compilation-database.schema", "config": "schema/config.schema", - "coverage": "schema/coverage-0.2.0.schema", + "coverage": "schema/coverage-0.3.0.schema", "cbiconfig": "schema/cbiconfig.schema", } if schema_name not in schema_paths.keys():