Skip to content

Commit

Permalink
Merge pull request #1439 from ewels/module-lint-keyerror
Browse files Browse the repository at this point in the history
Prevent module linting KeyError edge case.
  • Loading branch information
ewels authored Mar 14, 2022
2 parents 36ce758 + 5c248c4 commit 9ac3af8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* Call the command line help with `-h` as well as `--help` (was formerly just the latter) ([#1404](https://github.com/nf-core/tools/pull/1404))
* Add `.yamllint.yml` config file to avoid line length and document start errors in the tools repo itself.
* Switch to `yamllint-github-action`to be able to configure yaml lint exceptions ([#1404](https://github.com/nf-core/tools/issues/1413))
* Prevent module linting KeyError edge case ([#1321](https://github.com/nf-core/tools/issues/1321))
* Bump-versions: Don't trim the trailing newline on files, causes editorconfig linting to fail ([#1265](https://github.com/nf-core/tools/issues/1265))

### Modules
Expand Down
4 changes: 2 additions & 2 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ def _parse_output(self, line):
output = []
if "meta" in line:
output.append("meta")
if not "emit" in line:
if not "emit:" in line:
self.failed.append(("missing_emit", f"Missing emit statement: {line.strip()}", self.main_nf))
if "emit" in line:
else:
output.append(line.split("emit:")[1].strip())

return output
Expand Down

0 comments on commit 9ac3af8

Please sign in to comment.