Skip to content

Commit

Permalink
fixed a bug in validate lists files (#3997)
Browse files Browse the repository at this point in the history
* skipped _data.json files in list directory

* added log

* fix

* Update .changelog/3997.yml

Co-authored-by: dorschw <[email protected]>

---------

Co-authored-by: dorschw <[email protected]>
  • Loading branch information
merit-maita and dorschw authored Feb 6, 2024
1 parent 11ec5fa commit 6353b6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changelog/3997.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue where **validate** failed on _data.json, when saved in a folder under `Lists` (rather than directly under `Lists`).
type: fix
pr_number: 3997
2 changes: 1 addition & 1 deletion demisto_sdk/commands/validate/old_validate_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def is_skipped_file(self, file_path: str) -> bool:
path.name == "CommonServerPython.py"
and path.parent.parent.name != "Base"
)
or (path.parent.name == LISTS_DIR and path.name.endswith("_data.json"))
or (LISTS_DIR in path.parts[-3:] and path.name.endswith("_data.json"))
)

# flake8: noqa: C901
Expand Down

0 comments on commit 6353b6b

Please sign in to comment.