Skip to content

Conversation

@andresferben
Copy link

@andresferben andresferben commented Dec 10, 2025

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Fixed

  • If a line contains a comment with a keyword ('emit', 'take', 'main', etc.), the subworkflow linter would take it as the beginning of a new section (example).
  • If a file contains more than one workflow definition (example), the subworkflow linter would take everything after the first workflow as the "emit" section from the first workflow.

Both these bugs produce false positive warnings like "Included component not used in main.nf" because the linter is not able to properly capture the whole main section.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.65%. Comparing base (3d0c98d) to head (0c00af9).

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andresferben andresferben marked this pull request as ready for review December 10, 2025 21:28
@andresferben andresferben requested a review from jfy133 December 13, 2025 03:33
@sateeshperi sateeshperi requested a review from mashehu December 16, 2025 09:28
@atrigila
Copy link

I can help add some context of why this PR is useful. In nf-core/smrnaseq we had many issues with warnings when linting, as showed here: https://github.com/nf-core/smrnaseq/actions/runs/20112360084/job/57712837018. This fixes two edge-cases in the subworkflow linter that can generate misleading “Included component not used in main.nf” warnings.

Basically the message would say that almost all components of a subworkflow, e.g. INDEX_RRNA were not included in the main file, while they were there.

image

The linting would break after finding the word 'emit' (which was written as a comment in that subworkflow). This PR fixes that issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants