-
Notifications
You must be signed in to change notification settings - Fork 193
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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. @mirpedrol do you think this could result in some false positives?
Bonus points if you could add a test for this, @nh13 😉
@@ -206,6 +206,7 @@ def get_inputs_from_main_nf(self) -> None: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we care about leading spaces? See:
tools/nf_core/modules/lint/main_nf.py
Line 577 in 52e8109
line = line_raw.split("//")[0] |
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.md
is updateddocs
is updated