Skip to content

Add nextflow-lint pre-commit hook#10241

Open
mashehu wants to merge 5 commits intonf-core:masterfrom
mashehu:add-nextflow-lint-pre-commit-hook
Open

Add nextflow-lint pre-commit hook#10241
mashehu wants to merge 5 commits intonf-core:masterfrom
mashehu:add-nextflow-lint-pre-commit-hook

Conversation

@mashehu
Copy link
Contributor

@mashehu mashehu commented Feb 24, 2026

Supersedes #8391 (too many files changed in that PR) and #9726 (simpler setup)

(cherry picked from commit 302f3d3)
@mashehu mashehu force-pushed the add-nextflow-lint-pre-commit-hook branch from 9748caa to 81c104f Compare February 24, 2026 12:21
@LouisLeNezet
Copy link
Contributor

LouisLeNezet commented Feb 24, 2026

Shouldn't the pre-commit be ran only on the modified files ?
Currently it seems to run on all existing files.

The other issue, is that using the latest version of nextflow, generate new errors that I did not yet fix.
I think it would be best to use the stable release for this GA.

Similarly to what maxime did in his PR ?

      - name: Nextflow lint module ${{ matrix.module }}
        run: NXF_SYNTAX_PARSER=v2 nextflow lint modules/nf-core/${{ matrix.module }}

@mashehu mashehu force-pushed the add-nextflow-lint-pre-commit-hook branch from f558033 to d8e7aaa Compare February 24, 2026 12:52
@mashehu
Copy link
Contributor Author

mashehu commented Feb 24, 2026

Shouldn't the pre-commit be ran only on the modified files ?
Currently it seems to run on all existing files.

We had things slip through otherwise in the past. It is fast enough to run on all files, so this will keep the repo in better shape.

The other issue, is that using the latest version of nextflow, generate new errors that I did not yet fix.
I think it would be best to use the stable release for this GA.

I just wanted to test something, now back at latest stable (with the same error 🙁)

@LouisLeNezet
Copy link
Contributor

The error is indeed strange as it does not appear locally.
However the incriminated modules does have an issue.
It should be

process {
    withName: COVERM_GENOME {
        ext.reference_mode = 'dir'   // force directory branch
        ext.args = '--genome-fasta-extension fasta'
    }
}

Copy link
Contributor

@LouisLeNezet LouisLeNezet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be good now !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants