Skip to content

Commit

Permalink
ISSUE #11: Ignore empty file option added
Browse files Browse the repository at this point in the history
ISSUE #7: All files will be checked before crashing with error
  • Loading branch information
lyubick committed Nov 15, 2023
1 parent cad8de7 commit 1c5e62c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ inputs:
otherwise empty files will be ignored.
required: false
default: 'true'
schema-mapping:
description: ...
required: false
default: ''
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
8 changes: 7 additions & 1 deletion validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,11 @@ def validate_files(yaml_files: list, json_schema: json):
args = sys.argv[1:]

schema = load_schema(args[0])
files = get_yaml_json_files_list(args[1], args[2].lower() == 'true')

files = get_yaml_json_files_list(
files_paths_list=args[1],
is_recursive=args[2].lower() == 'true',
ignore_empty_files=args[3].lower() == 'true'
)

validate_files(files, schema)

0 comments on commit 1c5e62c

Please sign in to comment.