Skip to content

Commit

Permalink
Validate only specific doc examples with SHACL in CI.
Browse files Browse the repository at this point in the history
The check assumes that JSON example snippets are all parts of a single
JSON document that needs validating, but not all files are written
that way.  To avoid errors that have nothing to do with the
correctness of the examples, we should only check files which meet the
check's assumptions.

Fixes spdx#912.

Signed-off-by: Jeff Licquia <jeff@licquia.org>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
  • Loading branch information
Jeff Licquia authored and bact committed Apr 23, 2024
1 parent 5482619 commit a57c094
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/validate_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Check documentation examples
run: |
for f in $(grep -l '```json' docs/annexes/*.md); do
for f in docs/annexes/getting-started.md; do
echo "Checking $f"
cat $f | awk '/^```json/, $0=="```" {if ($0 !~ /^```.*/ ) print}' > temp.json
check-jsonschema \
Expand Down

0 comments on commit a57c094

Please sign in to comment.