Skip to content

Commit

Permalink
Add pre-commit hook to validate environment.ymls (#7086)
Browse files Browse the repository at this point in the history
* style: Add yaml type

* style: Change comments to name of pre-commit hooks

* style: Add validation for environment.ymls

* style: Validate GitHub action

* style: Make the path only modules

Co-authored-by: mirpedrol <[email protected]>

---------

Co-authored-by: mirpedrol <[email protected]>
  • Loading branch information
edmundmiller and mirpedrol authored Jan 27, 2025
1 parent 6506b7b commit 592ec15
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@ repos:
rev: 0.29.4
hooks:
- id: check-jsonschema
# match meta.ymls in one of the subdirectories of modules/nf-core
name: "Match meta.ymls in one of the subdirectories of modules/nf-core"
files: ^modules/nf-core/.*/meta\.yml$
types: [yaml]
args: ["--schemafile", "modules/yaml-schema.json"]
- id: check-jsonschema
# match meta.ymls in one of the subdirectories of subworkflows/nf-core
name: "Validate environment.ymls against schema"
files: ^modules/nf-core/.*/environment\.yml$
types: [yaml]
args: ["--schemafile", "modules/environment-schema.json"]
- id: check-jsonschema
name: "Match meta.ymls in one of the subdirectories of subworkflows/nf-core"
files: ^subworkflows/nf-core/.*/meta\.yml$
types: [yaml]
args: ["--schemafile", "subworkflows/yaml-schema.json"]
- id: check-github-workflows
- id: check-github-actions
# use ruff for python files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
Expand Down

0 comments on commit 592ec15

Please sign in to comment.