Skip to content

Commit

Permalink
define tools_version for linting messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Dec 15, 2023
1 parent 760903a commit 9021880
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nf_core/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ def format_result(test_results):
Given an list of error message IDs and the message texts, return a nicely formatted
string for the terminal with appropriate ASCII colours.
"""
tools_version = __version__
if "dev" in __version__:
tools_version = "latest"
for eid, msg in test_results:
tools_version = __version__
if "dev" in __version__:
tools_version = "latest"
yield Markdown(
f"[{eid}](https://nf-co.re/tools/docs/{tools_version}/pipeline_lint_tests/{eid}.html): {msg}"
)
Expand Down Expand Up @@ -462,6 +462,10 @@ def _get_results_md(self):
if len(self.failed) > 0:
overall_result = "Failed :x:"

tools_version = __version__
if "dev" in __version__:
tools_version = "latest"

# List of tests for details
test_failure_count = ""
test_failures = ""
Expand Down

0 comments on commit 9021880

Please sign in to comment.