mirror of https://github.com/bitnami/vulndb.git
Replace json-schema with check-jsonschema (#103)
Signed-off-by: Gonzalo Gomez Gracia <gonzalog@vmware.com>
This commit is contained in:
parent
1ad3c6931c
commit
2a7f74f389
|
@ -25,8 +25,8 @@ jobs:
|
|||
run: sudo apt-get install -y jq python3
|
||||
- name: Install markdownlint
|
||||
run: npm install -g markdownlint-cli@0.33.0
|
||||
- name: Install jsonschema
|
||||
run: python3 -m pip install jsonschema
|
||||
- name: Install check-jsonschema
|
||||
run: python3 -m pip install check-jsonschema
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout Repository
|
||||
- id: lint
|
||||
|
|
|
@ -19,6 +19,7 @@ elif [[ "$FORCE" -eq 1 ]] && [[ "${#files_to_check[@]}" -eq 0 ]]; then
|
|||
fi
|
||||
|
||||
if [[ "${#files_to_check[@]}" -ne 0 ]]; then
|
||||
echo "Will check ${#files_to_check[@]} files"
|
||||
for f in "${files_to_check[@]}"; do
|
||||
if [[ -f "$f" ]]; then
|
||||
# Run a different linter depending on file extension
|
||||
|
@ -38,7 +39,7 @@ if [[ "${#files_to_check[@]}" -ne 0 ]]; then
|
|||
exit_code=$?
|
||||
elif [[ "$f" =~ .*\/?data\/.* ]]; then
|
||||
# Check CVE file against OSV schema
|
||||
output="$(jsonschema "${root_dir}/config/validation/schema.json" < "$f" 2>/dev/null)"
|
||||
check-jsonschema --verbose --schemafile "${root_dir}/config/validation/schema.json" "$f"
|
||||
exit_code=$?
|
||||
fi
|
||||
if [[ $exit_code -ne 0 ]]; then
|
||||
|
|
Loading…
Reference in New Issue