Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pre-commit hooks #3141

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- id: lint-modules
name: Lint nf-core modules
# description: This hook trims trailing whitespace.
entry: nf-core --hide-progress modules lint
language: python
types: [text]
files: ^modules/.*/.*/.*\.nf$
pass_filenames: true
# args: []
- id: lint-subworkflows
name: Lint nf-core subworkflows
# description: This hook trims trailing whitespace.
entry: nf-core --hide-progress subworkflows lint
language: python
types: [text]
files: ^subworkflows/.*/.*/.*\.nf$
pass_filenames: true
# args: []
- id: lint-pipeline
name: Lint nf-core pipeline
description: Check pipeline code against nf-core guidelines.
entry: nf-core --hide-progress lint
language: python
types: [text]
# args: []
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
- Fix number of arguments for pipelines_create within the command_create function ([#3074](https://github.com/nf-core/tools/pull/3074))
- Update python:3.12-slim Docker digest to 740d94a ([#3079](https://github.com/nf-core/tools/pull/3079))
- Update pre-commit hook pre-commit/mirrors-mypy to v1.11.1 ([#3091](https://github.com/nf-core/tools/pull/3091))
- Create pre-commit hooks ([#3141](https://github.com/nf-core/tools/pull/3141))

## [v2.14.1 - Tantalum Toad - Patch](https://github.com/nf-core/tools/releases/tag/2.14.1) - [2024-05-09]

Expand Down
4 changes: 4 additions & 0 deletions nf_core/pipeline-template/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ repos:
hooks:
- id: editorconfig-checker
alias: ec
- repo: https://github.com/nf-core/tools
rev: "2.14.1"
hooks:
- id: lint-pipeline
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-0/test_github_details0
Submodule test_github_details0 deleted from ee82f3
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-0/test_github_exit_message0
Submodule test_github_exit_message0 deleted from f7fe48
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-0/test_github_question0
Submodule test_github_question0 deleted from dce332
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-1/test_github_details0
Submodule test_github_details0 deleted from e2638d
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-1/test_github_exit_message0
Submodule test_github_exit_message0 deleted from 74cda8
1 change: 0 additions & 1 deletion tmp/pytest-of-gitpod/pytest-1/test_github_question0
Submodule test_github_question0 deleted from 444ebc