Skip to content

Commit

Permalink
Merge pull request #1121 from KevinMenden/module-lint-refactor
Browse files Browse the repository at this point in the history
Module lint refactor
KevinMenden authored Jun 23, 2021

Verified

This commit was signed with the committer’s verified signature. The key has expired.
miri64 Martine Lenders
2 parents aef5f87 + f5ea21a commit c196325
Showing 10 changed files with 983 additions and 894 deletions.
5 changes: 3 additions & 2 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
@@ -508,10 +508,11 @@ def create_test_yml(ctx, tool, run_tests, output, force, no_prompts):
@click.pass_context
@click.argument("pipeline_dir", type=click.Path(exists=True), required=True, metavar="<pipeline/modules directory>")
@click.option("-t", "--tool", type=str, metavar="<tool> or <tool/subtool>")
@click.option("-k", "--key", type=str, metavar="<test>", multiple=True, help="Run only these lint tests")
@click.option("-a", "--all", is_flag=True, metavar="Run on all discovered tools")
@click.option("--local", is_flag=True, help="Run additional lint tests for local modules")
@click.option("--passed", is_flag=True, help="Show passed tests")
def lint(ctx, pipeline_dir, tool, all, local, passed):
def lint(ctx, pipeline_dir, tool, key, all, local, passed):
"""
Lint one or more modules in a directory.
@@ -522,7 +523,7 @@ def lint(ctx, pipeline_dir, tool, all, local, passed):
nf-core/modules repository.
"""
try:
module_lint = nf_core.modules.ModuleLint(dir=pipeline_dir)
module_lint = nf_core.modules.ModuleLint(dir=pipeline_dir, key=key)
module_lint.modules_repo = ctx.obj["modules_repo_obj"]
module_lint.lint(module=tool, all_modules=all, print_results=True, local=local, show_passed=passed)
if len(module_lint.failed) > 0:
Loading

0 comments on commit c196325

Please sign in to comment.