Skip to content

Commit

Permalink
Merge pull request #3458 from nf-core/nh13-patch-1
Browse files Browse the repository at this point in the history
fix: linting with comments after the input directive
  • Loading branch information
nh13 authored Feb 20, 2025
2 parents 22eb20c + b253681 commit 1e63caf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Linting

- Add linting for ifEmpty(null) ([#3411](https://github.com/nf-core/tools/pull/3411))
- fix: linting with comments after the input directive ([#3458](https://github.com/nf-core/tools/pull/3458))

### Modules

Expand Down
1 change: 1 addition & 0 deletions nf_core/components/nfcore_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
regex = r"(val|path)\s*(\(([^)]+)\)|\s*([^)\s,]+))"
matches = re.finditer(regex, line)
for _, match in enumerate(matches, start=1):
Expand Down

0 comments on commit 1e63caf

Please sign in to comment.