Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/nf-core/tools into fix-lint-…
Browse files Browse the repository at this point in the history
…regex
  • Loading branch information
ErikDanielsson committed Aug 9, 2021
2 parents 66c0c4e + 4c8886e commit 5989fe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Changed `questionary` `ask()` to `unsafe_ask()` to not catch `KeyboardInterupts` ([#1237](https://github.com/nf-core/tools/issues/1237))
* Fixed bug in `nf-core launch` due to revisions specified with `-r` not being added to nextflow command. ([#1246](https://github.com/nf-core/tools/issues/1246))
* Update regex in `readme` test of `nf-core lint` to agree with the pipeline template ([#1260](https://github.com/nf-core/tools/issues/1260))
* Update 'fix' message in `nf-core lint` to conform to the current command line options. ([#1259](https://github.com/nf-core/tools/issues/1259))

### Modules

Expand Down
4 changes: 3 additions & 1 deletion nf_core/lint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def print_fixes(lint_obj, module_lint_obj):
"""Prints available and applied fixes"""

if len(lint_obj.could_fix):
fix_cmd = "nf-core lint {} --fix {}".format(lint_obj.wf_path, " --fix ".join(lint_obj.could_fix))
fix_cmd = "nf-core lint {}--fix {}".format(
"" if lint_obj.wf_path == "." else f"--dir {lint_obj.wf_path}", " --fix ".join(lint_obj.could_fix)
)
console.print(
f"\nTip: Some of these linting errors can automatically be resolved with the following command:\n\n[blue] {fix_cmd}\n"
)
Expand Down

0 comments on commit 5989fe9

Please sign in to comment.