planemo
planemo copied to clipboard
Fix shed linting to respect --fail_fast.
Should fix #542.
Didn't work for me, checked out 85ca59a656d2119fbbdf2134c912695bc0599f36 from your branch:
$ planemo shed_lint tools/ -r --fail_fast ; echo "Return code $?"
Linting repository /Volumes/Hitachi-3TB-mirrored/repositories/pico_galaxy/tools/align_back_trans
Applying linter expansion... CHECK
.. INFO: Included files all found.
...
Linting repository /Volumes/Hitachi-3TB-mirrored/repositories/pico_galaxy/tools/mira3
Applying linter expansion... WARNING
.. WARNING: Failed to expand inclusions [{u'source': u'../../tools/mira3/mira.py', u'strip_components': 2}, {u'source': u'../../tools/mira3/mira.xml', u'strip_components': 2}, {u'source': u'../../tools/mira3/tool_dependencies.xml', u'strip_components': 2}]
Applying linter tool_dependencies_xsd... CHECK
.. INFO: No tool_dependencies.xml, skipping.
Applying linter tool_dependencies_sha256sum... CHECK
.. INFO: No tool_dependencies.xml, skipping.
Applying linter tool_dependencies_actions... CHECK
.. INFO: No tool_dependencies.xml, skipping.
Applying linter repository_dependencies... CHECK
.. INFO: No repository_dependencies.xml, skipping.
Applying linter shed_yaml... CHECK
.. INFO: .shed.yml found and appears to be valid YAML.
Applying linter readme... CHECK
.. INFO: README found containing valid reStructuredText.
Traceback (most recent call last):
File "/usr/local/bin/planemo", line 9, in <module>
load_entry_point('planemo==0.30.0.dev0', 'console_scripts', 'planemo')()
File "/Library/Python/2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/Library/Python/2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Python/2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/Library/Python/2.7/site-packages/click-5.1-py2.7.egg/click/decorators.py", line 63, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/Library/Python/2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/Library/Python/2.7/site-packages/planemo-0.30.0.dev0-py2.7.egg/planemo/cli.py", line 174, in handle_profile_options
return f(*args, **kwds)
File "/Library/Python/2.7/site-packages/planemo-0.30.0.dev0-py2.7.egg/planemo/commands/cmd_shed_lint.py", line 58, in cli
exit_code = shed.for_each_repository(ctx, lint, paths, **kwds)
File "/Library/Python/2.7/site-packages/planemo-0.30.0.dev0-py2.7.egg/planemo/shed/__init__.py", line 712, in for_each_repository
function(realized_repository)
File "/Library/Python/2.7/site-packages/planemo-0.30.0.dev0-py2.7.egg/planemo/commands/cmd_shed_lint.py", line 55, in lint
return shed_lint.lint_repository(ctx, realized_repository, **kwds)
File "/Library/Python/2.7/site-packages/planemo-0.30.0.dev0-py2.7.egg/planemo/shed_lint.py", line 126, in lint_repository
raise Exception("Failed to lint repository.")
Exception: Failed to lint repository.
Return code 1
It didn't stop after the first tool which failed linting, and then didn't exit cleanly.
I see - I think it probably did stop after the first repo encountered - but yeah there could be multiple tools within a repository. This needs more work.