From c504b4ff6776ee6ef196a21cfe0187177abddd7e Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Mon, 11 May 2026 14:30:46 +0100 Subject: [PATCH 1/2] Update regex to make it more specific for looking at meta variables in script --- nf_core/modules/lint/main_nf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/modules/lint/main_nf.py b/nf_core/modules/lint/main_nf.py index b589bc3f0c..86b3d0f206 100644 --- a/nf_core/modules/lint/main_nf.py +++ b/nf_core/modules/lint/main_nf.py @@ -304,7 +304,7 @@ def check_script_section(self, lines): permitted_meta_keys = {"id", "single_end"} invalid_meta_keys = [ f"{prefix}{key}" - for prefix, key in re.findall(r"\b(meta\d*\??\.)(\w+)\b(?!\()", script) + for prefix, key in re.findall(r"\b({(meta\d*\??\.)(\w+)\b(?!\()})", script) if key not in permitted_meta_keys ] if not invalid_meta_keys: From 6688133253a0b96697469401ee7604fee92d3d83 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Mon, 11 May 2026 14:35:56 +0100 Subject: [PATCH 2/2] Add changes to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56398753fc..dcedf5f366 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Linting - accept `process_low_memory` as a standard module label ([#4264](https://github.com/nf-core/tools/pull/4264)) +- make regex for meta keys more specific to avoid false positives ([#XXXX](https://github.com/nf-core/tools/pull/XXXX)) ### Modules