fix: linting with comments after the input directive#3458
Conversation
This PR is against the
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files☔ View full report in Codecov by Sentry. |
|
@nf-core-bot changelog |
mashehu
left a comment
There was a problem hiding this comment.
Looks good. @mirpedrol do you think this could result in some false positives?
Bonus points if you could add a test for this, @nh13 😉
| input_data = data.split("input:")[1].split("output:")[0] | ||
| for line in input_data.split("\n"): | ||
| channel_elements: Any = [] | ||
| line = line.split("//")[0] # remove any trailing comments |
There was a problem hiding this comment.
| line = line.split("//")[0] # remove any trailing comments | |
| line = line.split(" //")[0] # remove any trailing comments |
make it a bit more error proof
There was a problem hiding this comment.
Why do we care about leading spaces? See:
tools/nf_core/modules/lint/main_nf.py
Line 577 in 52e8109
|
woops! Didn't see the auto-merge... @nh13 any chance you could open one more PR with the suggested changes? |
Looks good, I think it's unlikely to find |
Fixes: #3457
PR checklist
CHANGELOG.mdis updateddocsis updated