Skip to content

Commit

Permalink
Update error_codes("RM112") decorator (#4006)
Browse files Browse the repository at this point in the history
* Added fix

* Added changelog

* Pre-commit

* Update .changelog/4006.yml

Co-authored-by: Yuval Hayun <70104171+YuvHayun@users.noreply.github.com>

---------

Co-authored-by: Yuval Hayun <70104171+YuvHayun@users.noreply.github.com>
  • Loading branch information
anas-yousef and YuvHayun committed Feb 15, 2024
1 parent 884a06e commit 48d8c6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changelog/4006.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue where validate would state that it failed, even though it shouldn't, and then it would display an empty list of content items when running on specific validations.
type: fix
pr_number: 4006
2 changes: 1 addition & 1 deletion demisto_sdk/commands/common/hook_validations/readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ def verify_readme_image_paths(self) -> bool:
return False
return True

@error_codes("RM112")
def verify_readme_relative_urls(self) -> bool:
"""Validate readme (not pack readme) relative urls.
Expand All @@ -344,7 +345,6 @@ def verify_readme_relative_urls(self) -> bool:
# If there are errors in one of the following validations return False
return not self.check_readme_relative_url_paths()

@error_codes("RM112")
def check_readme_relative_url_paths(self, is_pack_readme: bool = False) -> list:
"""Validate readme url relative paths.
prints an error if relative paths in README are found since they are not supported.
Expand Down

0 comments on commit 48d8c6c

Please sign in to comment.