Skip to content

Commit

Permalink
Merge pull request #2838 from asp8200/2833_linting_params_in_main_nf
Browse files Browse the repository at this point in the history
Linting params in main.nf
  • Loading branch information
asp8200 authored Mar 11, 2024
2 parents 65001ef + 2e1c818 commit d4e5243
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

### Linting

- Only match assignments of params in `main.nf` and not references like `params.aligner == <something>` ([#2833](https://github.com/nf-core/tools/pull/2833))

### Components

### General
Expand Down
2 changes: 1 addition & 1 deletion nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d4e5243

Please sign in to comment.