Skip to content

Commit

Permalink
raise report level for some shed linting
Browse files Browse the repository at this point in the history
I think these are all cases which lead to errors in deploying.

fixes https://github.com/galaxyproject/tools-iuc/issues/3384
  • Loading branch information
bernt-matthias committed Dec 15, 2020
1 parent 38227c1 commit 2f8d4f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions planemo/shed_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@ def lint_shed_yaml(realized_repository, lint_ctx):
path = realized_repository.real_path
shed_yaml = os.path.join(path, ".shed.yml")
if not os.path.exists(shed_yaml):
lint_ctx.info("No .shed.yml file found, skipping.")
lint_ctx.error("No .shed.yml file found, skipping.")
return
try:
with open(shed_yaml, "r") as fh:
yaml.safe_load(fh)
except Exception as e:
lint_ctx.warn("Failed to parse .shed.yml file [%s]" % unicodify(e))
lint_ctx.error("Failed to parse .shed.yml file [%s]" % unicodify(e))
return
lint_ctx.info(".shed.yml found and appears to be valid YAML.")
_lint_shed_contents(lint_ctx, realized_repository)
Expand All @@ -311,7 +311,7 @@ def _lint_if_present(key, func, *args):
if value is not None:
msg = func(value, *args)
if msg:
lint_ctx.warn(msg)
lint_ctx.error(msg)

_lint_if_present("owner", validate_repo_owner)
_lint_if_present("name", validate_repo_name)
Expand Down

0 comments on commit 2f8d4f6

Please sign in to comment.