diff --git a/CHANGELOG.md b/CHANGELOG.md index ce479c29bb..3239824803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ### Linting +- Only match assignments of params in `main.nf` and not references like `params.aligner == ` ([#2833](https://github.com/nf-core/tools/pull/2833)) + ### Components ### General diff --git a/nf_core/utils.py b/nf_core/utils.py index 8ea6f418aa..9261388a39 100644 --- a/nf_core/utils.py +++ b/nf_core/utils.py @@ -289,7 +289,7 @@ def fetch_wf_config(wf_path, cache_config=True): main_nf = os.path.join(wf_path, "main.nf") with open(main_nf) as fh: for line in fh: - match = re.match(r"^\s*(params\.[a-zA-Z0-9_]+)\s*=", line) + match = re.match(r"^\s*(params\.[a-zA-Z0-9_]+)\s*=(?!=)", line) if match: config[match.group(1)] = "null" except FileNotFoundError as e: