Skip to content

Commit

Permalink
Merge pull request #1398 from bernt-matthias/topic/lint_drop_md
Browse files Browse the repository at this point in the history
drop markdown check for markdown
  • Loading branch information
mvdbeek authored Oct 29, 2023
2 parents 31b2f1b + 14671db commit cada8bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions planemo/shed_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,15 @@ def lint_readme(realized_repository, lint_ctx):
if os.path.exists(readme):
readme_found = readme

readme_md = os.path.join(path, "README.md")
if not readme_found and os.path.exists(readme_md):
lint_ctx.warn("Tool Shed doesn't render markdown, " "README.md is invalid readme.")
return

if not readme_found:
# TODO: filter on TYPE and make this a warning if
# unrestricted repository - need to update iuc standards
# first though.
lint_ctx.info("No README found skipping.")
readme_md = os.path.join(path, "README.md")
if os.path.exists(readme_md):
lint_ctx.info("Found README in Markdown format, which is not rendered by the Tool Shed, skipping")
else:
lint_ctx.info("No README found, skipping.")
return

if readme_found.endswith(".rst"):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_shed_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_invalid_repos(self):
with self._isolate_repo("bad_readme_rst"):
self._check_exit_code(["shed_lint"], exit_code=1)
with self._isolate_repo("bad_readme_md"):
self._check_exit_code(["shed_lint"], exit_code=1)
self._check_exit_code(["shed_lint"], exit_code=0)
with self._isolate_repo("bad_repo_name"):
self._check_exit_code(["shed_lint"], exit_code=1)
with self._isolate_repo("bad_missing_include"):
Expand Down

0 comments on commit cada8bd

Please sign in to comment.