Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shed linting to respect --fail_fast. #547

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmchilton
Copy link
Member

Should fix #542.

@peterjc
Copy link
Contributor

peterjc commented Aug 22, 2016

Didn't work for me, checked out 85ca59a 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.

@jmchilton
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

planemo shed_lint --fail_fast broken?
2 participants