Skip to content

Commit

Permalink
Updated URL for pipeline lint test docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Mar 15, 2022
1 parent eb35d3a commit 0e3edff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* Prevent module linting KeyError edge case ([#1321](https://github.com/nf-core/tools/issues/1321))
* Bump-versions: Don't trim the trailing newline on files, causes editorconfig linting to fail ([#1265](https://github.com/nf-core/tools/issues/1265))
* Handle exception in `nf-core list` when a broken git repo is found ([#1273](https://github.com/nf-core/tools/issues/1273))
* Updated URL for pipeline lint test docs ([#1348](https://github.com/nf-core/tools/issues/1348))

### Modules

Expand Down
12 changes: 9 additions & 3 deletions nf_core/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
import git
import json
import logging
import os
import re
import rich
import rich.progress
import yaml

import nf_core.utils
import nf_core.lint_utils
import nf_core.modules.lint
from nf_core import __version__
from nf_core.lint_utils import console

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -331,7 +330,14 @@ def format_result(test_results, table):
string for the terminal with appropriate ASCII colours.
"""
for eid, msg in test_results:
table.add_row(Markdown("[{0}](https://nf-co.re/tools-docs/lint_tests/{0}.html): {1}".format(eid, msg)))
tools_version = __version__
if "dev" in __version__:
tools_version = "latest"
table.add_row(
Markdown(
f"[{eid}](https://nf-co.re/tools/docs/{tools_version}/pipeline_lint_tests/{eid}.html): {msg}"
)
)
return table

def _s(some_list):
Expand Down

0 comments on commit 0e3edff

Please sign in to comment.