Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Linting

- Warn if container access is denied ([#2270](https://github.com/nf-core/tools/pull/2270))

### Modules

### Subworkflows
Expand Down
16 changes: 9 additions & 7 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,14 @@ def check_process_section(self, lines, fix_version, progress_bar):
log.debug(f"Unable to connect to url '{urlunparse(url)}' due to error: {e}")
self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf))
continue
if response.status_code != 200:
self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf))
if not response.ok:
self.failed.append(
(
"container_links",
f"Unable to connect to {response.url}, status code: {response.status_code}",
self.main_nf,
)
)

# Check that all bioconda packages have build numbers
# Also check for newer versions
Expand Down Expand Up @@ -581,9 +587,5 @@ def _container_type(line):
if url_match:
return "singularity"
return None
if (
line.startswith("biocontainers/")
or line.startswith("quay.io/")
or (line.count("/") == 1 and line.count(":") == 1)
):
if line.count("/") >= 1 and line.count(":") == 1:
return "docker"