Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New container linting causes index-error unless container spreads over 3 lines #2116

Closed
awgymer opened this issue Dec 9, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@awgymer
Copy link
Contributor

awgymer commented Dec 9, 2022

Description of the bug

Reported on Slack:

286 │   │   if l.startswith("container"):                                  │
287 │   │   │   container_section = l + lines[i + 1] + lines[i + 2]        │
288 │   │   │   if container_section.count('"') > 2:                       │

IndexError: list index out of range

This assumption works fine for modules that adhere strictly to the nf-core template but if the module has fewer than 3 lines for the container directive this will error or perhaps worse capture lines of other directives.

This affects local modules which might feasibly and legitimately have e.g. only a docker

container "my.dockerhub.url/mycontainer:tag"

Command used and terminal output

No response

System information

nf-core toools v2.7

@awgymer awgymer added the bug Something isn't working label Dec 9, 2022
@mashehu mashehu added this to the 2.7.2 milestone Dec 9, 2022
@mirpedrol mirpedrol self-assigned this Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants