diff --git a/.reuse/dep5 b/.reuse/dep5 index 375f98f9..24f59b16 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -7,6 +7,10 @@ Files: reuse-docs/* Copyright: 2019 Free Software Foundation Europe License: CC-BY-SA-4.0 +Files: site/static/schemas/* +Copyright: 2023 Free Software Foundation Europe +License: CC0-1.0 + Files: site/static/fonts/roboto/* Copyright: 2018 Google License: Apache-2.0 diff --git a/reuse-docs b/reuse-docs index 928dbafe..fcd90cd1 160000 --- a/reuse-docs +++ b/reuse-docs @@ -1 +1 @@ -Subproject commit 928dbafebcb47026f62ae1c7fccadea471866d3a +Subproject commit fcd90cd197bb7ee8f463cf8bc58046614e427099 diff --git a/site/static/schemas/1.0.0_lint_schema.json b/site/static/schemas/1.0.0_lint_schema.json new file mode 100644 index 00000000..580e049f --- /dev/null +++ b/site/static/schemas/1.0.0_lint_schema.json @@ -0,0 +1,176 @@ +{ + "$schema": "https://reuse.software/schemas/1.0.0_lint_schema.json", + "$ref": "#/definitions/Result", + "definitions": { + "Result": { + "type": "object", + "additionalProperties": false, + "properties": { + "lint_version": { + "type": "string" + }, + "reuse_spec_version": { + "type": "string" + }, + "reuse_tool_version": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/File" + } + }, + "non_compliant": { + "$ref": "#/definitions/NonCompliant" + }, + "summary": { + "$ref": "#/definitions/Summary" + } + }, + "required": [ + "files", + "lint_version", + "non_compliant", + "reuse_spec_version", + "reuse_tool_version", + "summary" + ], + "title": "Welcome" + }, + "File": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "type": "string" + }, + "copyrights": { + "type": "array", + "items": { + "$ref": "#/definitions/Copyright" + } + }, + "licenses": { + "type": "array", + "items": { + "$ref": "#/definitions/Copyright" + } + } + }, + "required": ["copyrights", "licenses", "path"], + "title": "File" + }, + "Copyright": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string" + }, + "source": { + "type": "string" + } + }, + "required": ["source", "value"], + "title": "Copyright" + }, + "NonCompliant": { + "type": "object", + "additionalProperties": false, + "properties": { + "missing_licenses": { + "$ref": "#/definitions/MissingLicenses" + }, + "unused_licenses": { + "type": "array", + "items": {} + }, + "deprecated_licenses": { + "type": "array", + "items": {} + }, + "bad_licenses": { + "$ref": "#/definitions/BadLicenses" + }, + "licenses_without_extension": { + "$ref": "#/definitions/LicensesWithoutExtension" + }, + "missing_copyright_info": { + "type": "array", + "items": { + "type": "string" + } + }, + "missing_licensing_info": { + "type": "array", + "items": { + "type": "string" + } + }, + "read_errors": { + "type": "array", + "items": {} + } + }, + "required": [ + "bad_licenses", + "deprecated_licenses", + "licenses_without_extension", + "missing_copyright_info", + "missing_licenses", + "missing_licensing_info", + "read_errors", + "unused_licenses" + ], + "title": "NonCompliant" + }, + "BadLicenses": { + "type": "object", + "additionalProperties": { "type": "object" }, + "title": "BadLicenses" + }, + "LicensesWithoutExtension": { + "type": "object", + "additionalProperties": { "type": "object" }, + "title": "LicensesWithoutExtension" + }, + "MissingLicenses": { + "type": "object", + "additionalProperties": { "type": "object" }, + "title": "MissingLicenses" + }, + "Summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "used_licenses": { + "type": "array", + "items": { + "type": "string" + } + }, + "files_total": { + "type": "integer" + }, + "files_with_copyright_info": { + "type": "integer" + }, + "files_with_licensing_info": { + "type": "integer" + }, + "compliant": { + "type": "boolean" + } + }, + "required": [ + "compliant", + "files_total", + "files_with_copyright_info", + "files_with_licensing_info", + "used_licenses" + ], + "title": "Summary" + } + } +} diff --git a/sync-docs.sh b/sync-docs.sh index b045f1da..a0cde312 100755 --- a/sync-docs.sh +++ b/sync-docs.sh @@ -34,6 +34,12 @@ for f in faq.md spec.md tutorial.md; do done done +# Define variable +lint_schema_version="1.0.0" +lint_schema="$basedir"/reuse-docs/"$lint_schema_version"_lint_schema.json +# Copy this file to +cp "$lint_schema" "$basedir"/site/static/schemas + # Make permissions of newly generated folders the same as the already existing files uidgid=$(stat -c '%u:%g' "$basedir") chown -R "$uidgid" "$basedir"