Skip to content

Add nextflow-lint pre-commit hook#10241

Merged
mashehu merged 4 commits intonf-core:masterfrom
mashehu:add-nextflow-lint-pre-commit-hook
Mar 2, 2026
Merged

Add nextflow-lint pre-commit hook#10241
mashehu merged 4 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)

@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 !

@LouisLeNezet
Copy link
Contributor

Should we merge @mashehu ?

@mashehu mashehu added this pull request to the merge queue Mar 2, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 2, 2026
@LouisLeNezet LouisLeNezet added this pull request to the merge queue Mar 2, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 2, 2026
@mashehu mashehu force-pushed the add-nextflow-lint-pre-commit-hook branch from 5b747b1 to a0293d7 Compare March 2, 2026 15:29
@mashehu mashehu merged commit 8583516 into nf-core:master Mar 2, 2026
26 of 27 checks passed
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