Skip to content
30 changes: 30 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# TODO https://github.com/nf-core/tools/issues/3140
# - 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/[^/]+$
# pass_filenames: true
# args: []
# NOTE See https://github.com/nf-core/modules/pull/7084 for reasoning
- id: lint-subworkflows
name: Lint nf-core subworkflows
description: Runs linting on all the subworkflows
entry: nf-core --hide-progress subworkflows lint -a
language: python
types: [text]
files: ^subworkflows/[^/]+$
alias: sw
pass_filenames: false
# args: []
- id: lint-pipeline
name: Lint nf-core pipeline
description: Check pipeline code against nf-core guidelines.
entry: nf-core --hide-progress pipelines lint
language: python
types: [text]
pass_filenames: false
stages: [pre-push, manual]
# args: ["--fix"]
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
- Update pre-commit hook pre-commit/mirrors-mypy to v1.11.1 ([#3091](https://github.com/nf-core/tools/pull/3091))
- Update to pytest v8 and move it to dev dependencies ([#3058](https://github.com/nf-core/tools/pull/3058))
- Update minimal textual version and snapshots ([#2998](https://github.com/nf-core/tools/pull/2998))
- 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: "3.1.0"
hooks:
- id: lint-pipeline
Loading