Skip to content

Commit

Permalink
Update coverage schema to 0.2.0
Browse files Browse the repository at this point in the history
The new schema allows for coverage files to contain both a file hash
and (optional) path information.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
  • Loading branch information
Pennycook committed Feb 5, 2024
1 parent 143c947 commit 360d840
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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/importcfg.schema
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/intel/p3-analysis-library/main/p3/data/coverage-0.1.0.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",
Expand All @@ -10,6 +10,9 @@
"file": {
"type": "string"
},
"path": {
"type": "string"
},
"regions": {
"type": "array",
"items": {
Expand Down
2 changes: 1 addition & 1 deletion codebasin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _validate_json(json_object: object, schema_name: str) -> bool:
schema_paths = {
"compiledb": "schema/compilation-database.schema",
"config": "schema/config.schema",
"coverage": "schema/coverage-0.1.0.schema",
"coverage": "schema/coverage-0.2.0.schema",
"importcfg": "schema/importcfg.schema",
}
if schema_name not in schema_paths.keys():
Expand Down

0 comments on commit 360d840

Please sign in to comment.