nf-core / tools

Python package with helper tools for the nf-core community.
https://nf-co.re
MIT License
241 stars 190 forks source link

Pass a list of modules/subworkflows(files) to nf-core modules lint #3140

Open edmundmiller opened 2 months ago

edmundmiller commented 2 months ago

Description of feature

I was working on https://github.com/nf-core/modules/pull/6286 last week.

I really wanted to avoid using path-filter and having the whole separate step logic for the linting.

I think we could offload the changed files to pre-commit, and create pre-commit hooks for nf-core/tools. I think it would be pretty slick for pipelines as well(I know I don't run nf-core lint often enough personally)

The only issue I had was the way pre-commit passes files. It will pass nf-core modules lint modules/nf-core/bowtie/align/main.nf modules/nf-core/bowtie/build/main.nf modules/nf-core/fastqc/main.nf ... which currently doesn't work.