From 57a92a0eff27c3570ae2cfcf73a765a66ed3c541 Mon Sep 17 00:00:00 2001 From: lmReef Date: Thu, 5 Dec 2024 09:34:08 +1300 Subject: [PATCH 1/4] fix: module section linter regex --- nf_core/modules/lint/main_nf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nf_core/modules/lint/main_nf.py b/nf_core/modules/lint/main_nf.py index 848e17130..599d50cd2 100644 --- a/nf_core/modules/lint/main_nf.py +++ b/nf_core/modules/lint/main_nf.py @@ -96,19 +96,19 @@ def main_nf( for line in iter_lines: if re.search(r"^\s*process\s*\w*\s*{", line) and state == "module": state = "process" - if re.search(r"input\s*:", line) and state in ["process"]: + if re.search(r"^\s*input\s*:", line) and state in ["process"]: state = "input" continue - if re.search(r"output\s*:", line) and state in ["input", "process"]: + if re.search(r"^\s*output\s*:", line) and state in ["input", "process"]: state = "output" continue - if re.search(r"when\s*:", line) and state in ["input", "output", "process"]: + if re.search(r"^\s*when\s*:", line) and state in ["input", "output", "process"]: state = "when" continue - if re.search(r"script\s*:", line) and state in ["input", "output", "when", "process"]: + if re.search(r"^\s*script\s*:", line) and state in ["input", "output", "when", "process"]: state = "script" continue - if re.search(r"shell\s*:", line) and state in ["input", "output", "when", "process"]: + if re.search(r"^\s*shell\s*:", line) and state in ["input", "output", "when", "process"]: state = "shell" continue From 355dff2c8e8fa28b628459bab65efeadf3793dfc Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Wed, 4 Dec 2024 21:10:36 +0000 Subject: [PATCH 2/4] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da5f72c35..91c70f443 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ ### Modules - add a panel around diff previews when updating ([#3246](https://github.com/nf-core/tools/pull/3246)) +- Fix module section linter regex ([#3321](https://github.com/nf-core/tools/pull/3321)) ### Subworkflows From 9996df9e061a7512f6cce1d34fc0e8f7a937df95 Mon Sep 17 00:00:00 2001 From: lmReef Date: Thu, 5 Dec 2024 10:11:58 +1300 Subject: [PATCH 3/4] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91c70f443..b75b86574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ ### Linting - allow mixed `str` and `dict` entries in lint config ([#3228](https://github.com/nf-core/tools/pull/3228)) +- fix module section regex matching wrong things ([#3321](https://github.com/nf-core/tools/pull/3321)) ### Modules From c22c571cff747b1fb47ae11d3dc1fa76e14a9a2f Mon Sep 17 00:00:00 2001 From: lmReef Date: Thu, 5 Dec 2024 10:14:01 +1300 Subject: [PATCH 4/4] Revert "[automated] Update CHANGELOG.md" This reverts commit 355dff2c8e8fa28b628459bab65efeadf3793dfc. --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b75b86574..67417f940 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,6 @@ ### Modules - add a panel around diff previews when updating ([#3246](https://github.com/nf-core/tools/pull/3246)) -- Fix module section linter regex ([#3321](https://github.com/nf-core/tools/pull/3321)) ### Subworkflows