-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
demisto/etc#23233 added all files validation #343
Conversation
72a0f1c
to
4093d6b
Compare
demisto_sdk/__main__.py
Outdated
@@ -204,6 +204,9 @@ def unify(**kwargs): | |||
@click.option( | |||
'-p', '--path', help='Path of file to validate specifically, outside of a git directory.' | |||
) | |||
@click.option( | |||
'-a', '--validate-all', is_flag=True, show_default=True, default=False, help='Whether to validate all files or not' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets improve description here, and add to it that it will run all validations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run the command against content and make sure you catch all json/yml files.
there might be some paths missing in the regex coverage
if not structure_validator.is_valid_file(): | ||
self._is_valid = False | ||
|
||
elif re.match(PLAYBOOK_REGEX, file_path, re.IGNORECASE) or file_type == 'playbook': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about pack/beta playbooks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beta playbooks will be removed to legacy playbooks
Packs playbooks are validated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where are they validated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this catches all files in Packs recursively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but then you get here and ignore them since they are not accepted by this regex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The playbooks are not ignored because of the or file_type == 'playbook'
part
This pull request introduces 3 alerts when merging 0b80dbcdf110b971088f13f7490b297940e1526a into ccf04e0 - view on LGTM.com new alerts:
|
0b80dbc
to
4c70b0b
Compare
4c70b0b
to
78cd582
Compare
d0459a9
to
dee6ec6
Compare
Pull Request Test Coverage Report for Build 2573
💛 - Coveralls |
134cb9c
to
a2e64f6
Compare
a2e64f6
to
777fc32
Compare
777fc32
to
a5b9681
Compare
8837967
to
14f021e
Compare
This pull request introduces 1 alert when merging 14f021e95c7ad7ab6d7e9f43f595474e3d32ae91 into 1df3412 - view on LGTM.com new alerts:
|
14f021e
to
8f16641
Compare
Status
Related Issues
fixes: demisto/etc#23233
Description
Adds an option to add full validation to all files using
demisto-sdk validate -a
Must have