Description of the bug
When running nf-core modules lint on a module which contains a label not starting process_ an AttributeError is raised and the process errors out. It might be better if it was either reported as failing linting or ignored?
i.e.
process MYPROC {
label 'some_label'
...
}
As a side not I think that this would also fail if for some reason you had label in your container name - say there was tool called genome_labeller or something - because labels are found by the following which doesn't care where the term appears in the line:
process_label = [l for l in lines if "label" in l]
This could be changed to:
process_label = [l for l in lines if l.lstrip().startswith("label")]
Command used and terminal output
nf-core modules lint <somemodule>
/nf-core-tools/nf_core/modules/lint/main_nf.py:245 in check_process_section
244 │ if len(process_label) > 0:
❱ 245 │ │ process_label = re.search("process_[A-Za-z]+", process_label[0]).group(0)
246 │ │ if not process_label in correct_process_labels:
AttributeError: 'NoneType' object has no attribute 'group'
System information
nf-core/tools version 2.5.dev0
python 3.9.7
macOS
Description of the bug
When running
nf-core modules linton a module which contains a label not startingprocess_anAttributeErroris raised and the process errors out. It might be better if it was either reported as failing linting or ignored?i.e.
As a side not I think that this would also fail if for some reason you had
labelin your container name - say there was tool calledgenome_labelleror something - because labels are found by the following which doesn't care where the term appears in the line:This could be changed to:
Command used and terminal output
System information
nf-core/tools version 2.5.dev0
python 3.9.7
macOS