Skip to content

Commit

Permalink
error if quay.io found in docker container name
Browse files Browse the repository at this point in the history
Changes:
 - Linting error if container starts with quay.io/biocontainers but not
   quay.io/biocontainers/mulled

Fixes #2276
  • Loading branch information
adamrtalbot committed May 4, 2023
1 parent 1fae5c2 commit 4bad234
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Linting

- Warn if container access is denied ([#2270](https://github.com/nf-core/tools/pull/2270))
- Error if module container specification has quay.io as prefix when it shouldn't have.

### Modules

Expand Down
8 changes: 8 additions & 0 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,14 @@ def check_process_section(self, lines, fix_version, progress_bar):
else:
self.failed.append(("docker_tag", "Unable to parse docker tag", self.main_nf))
docker_tag = None
if l.startswith("quay.io/biocontainers") and not l.startswith("quay.io/biocontainers/mulled"):
self.failed.append(
(
"container_links",
"quay.io/biocontainers prefix found, please use biocontainers instead",
self.main_nf,
)
)
if l.startswith("biocontainers/"):
# When we think it is a biocontainer, assume we are querying quay.io/biocontainers and insert quay.io as prefix
l = "quay.io/" + l
Expand Down

0 comments on commit 4bad234

Please sign in to comment.