repos:
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: "v3.1.0"
    hooks:
      - id: prettier
        additional_dependencies:
          - prettier@3.8.3
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: trailing-whitespace
        args: [--markdown-linebreak-ext=md]
        exclude: |
          (?x)^(
              .*ro-crate-metadata.json$|
              modules/(?!local/).*|
              subworkflows/(?!local/).*|
              .*\.snap$
          )$
      - id: end-of-file-fixer
        exclude: |
          (?x)^(
              .*ro-crate-metadata.json$|
              modules/(?!local/).*|
              subworkflows/(?!local/).*|
              .*\.snap$
          )$
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.15.13
    hooks:
      - id: ruff-check
        files: \.py$
        exclude: |
          (?x)^(
              modules/(?!local/).*|
              subworkflows/(?!local/).*
          )$
        args: [--fix, --exit-non-zero-on-fix, "--select", "I,E1,E4,E7,E9,F,UP,N"]
      - id: ruff-format
        files: \.py$
        exclude: |
          (?x)^(
              modules/(?!local/).*|
              subworkflows/(?!local/).*
          )$
  - repo: https://github.com/seqeralabs/nf-lint-pre-commit
    rev: v0.3.0
    hooks:
      - id: nextflow-lint
        files: '\.nf$|nextflow\.config$'
        args: ["-output", "json"]
