Hey everyone, if I remember correctly, using if cl...
# team-maintainers
n
Hey everyone, if I remember correctly, using if clauses in
modules.config
has been labeled a bad practice before. I think there are some problems due to this in #scrnaseq. Is there any documentation of a detailed slack thread that I could refer to?
j
If it helps I think ternaries are still ok
Just literal if statements are bad
The language server will tell you
m
The if statements started being included into configs because Nextflow started issuing warnings when process selectors defined in modules.config, etc weren't being matched because of
if
statements in the main workflow. There's a flag one can use to turn these warnings off so you don't need
if
in the config
👍 1
If you want to go further you can modify the workflow to not use
if
, and replace with
filter
or
branch
channel operations
👍 1
n
Would it make sense to include the language server checks to the pipeline linting? Maybe as warnings like for remaining
TODO
strings? Currently if people don't know about the language server or choose not to use it, there is no nudging towards making them use it
j
The language server stuff only works within vscode I believe
I'm not sure where the docs are about the rules unfortunately
m
Given the language server will become the core nf parser at some point, it's good to let people know to make changes, but I think the specification is still a little in flux so it would be better to wait. That is I think we should let people know to use VScode and check things against the language server to be prepared, but given it's not quite fixed yet, I don't think we should force people to validate against it yet.
👍 1
n
Okay, thanks!