diff --git a/demisto_sdk/commands/content_graph/parsers/pack.py b/demisto_sdk/commands/content_graph/parsers/pack.py index 04c7a85169..ebb3c845d7 100644 --- a/demisto_sdk/commands/content_graph/parsers/pack.py +++ b/demisto_sdk/commands/content_graph/parsers/pack.py @@ -250,8 +250,8 @@ def __init__(self, path: Path, git_sha: Optional[str] = None) -> None: self.relationships: Relationships = Relationships() self.connect_pack_dependencies(metadata) try: - self.contributors: List[str] = get_json( - path / PACK_CONTRIBUTORS_FILENAME, git_sha=git_sha + self.contributors: List[str] = ( + get_json(path / PACK_CONTRIBUTORS_FILENAME, git_sha=git_sha) or [] ) except FileNotFoundError: logger.debug(f"No contributors file found in {path}") diff --git a/demisto_sdk/commands/validate/initializer.py b/demisto_sdk/commands/validate/initializer.py index 12a8b4a5ac..f7e18007f7 100644 --- a/demisto_sdk/commands/validate/initializer.py +++ b/demisto_sdk/commands/validate/initializer.py @@ -341,6 +341,10 @@ def get_files_from_git(self) -> Set[BaseContent]: renamed_files, deleted_files, ) = self.collect_files_to_run(self.file_path) + modified_files = self.filter_files(modified_files) + added_files = self.filter_files(added_files) + renamed_files = self.filter_files(renamed_files) + deleted_files = self.filter_files(deleted_files) basecontent_with_path_set: Set[BaseContent] = set() basecontent_with_path_set = basecontent_with_path_set.union( self.paths_to_basecontent_set( @@ -400,3 +404,17 @@ def paths_to_basecontent_set( except InvalidContentItemException: invalid_content_items.append(file_path) return basecontent_with_path_set + + def filter_files(self, files_set: Set[Path]): + """Filter out all the files with suffixes that are not supported by BaseContent. + + Args: + files_set (Set[Path]): The set of paths to filter + + Returns: + Set: The set of filtered files. + """ + extensions_list_to_filter = [".png", ".md", ".svg"] + return set( + file for file in files_set if file.suffix not in extensions_list_to_filter + )