202 lines
5.1 KiB
YAML
202 lines
5.1 KiB
YAML
|
|
default_install_hook_types:
|
||
|
|
- pre-commit
|
||
|
|
- commit-msg
|
||
|
|
default_stages:
|
||
|
|
- pre-commit
|
||
|
|
exclude: ^docs/snippets/|vendor/|node_modules/|target/|invalid*|dist/|artifacts/|test_documents/|scripts/ci/|^e2e/|^packages/|^crates/kreuzberg-(py|node|ffi|php|wasm)/|^docs/reference/api-|\.cache/|\.venv/|rust-vendor/
|
||
|
|
repos:
|
||
|
|
- repo: https://github.com/Goldziher/gitfluff
|
||
|
|
rev: v0.8.0
|
||
|
|
hooks:
|
||
|
|
- id: gitfluff-lint
|
||
|
|
args:
|
||
|
|
- --write
|
||
|
|
stages:
|
||
|
|
- commit-msg
|
||
|
|
- repo: https://github.com/kreuzberg-dev/pre-commit-hooks
|
||
|
|
rev: v1.2.3
|
||
|
|
hooks:
|
||
|
|
- id: ai-rulez-generate
|
||
|
|
- id: gh-actions-updater
|
||
|
|
- id: trailing-whitespace
|
||
|
|
- id: end-of-file-fixer
|
||
|
|
- id: check-merge-conflict
|
||
|
|
- id: check-added-large-files
|
||
|
|
exclude: uv.lock|docs/benchmarks/app/
|
||
|
|
- id: detect-private-key
|
||
|
|
- id: check-json
|
||
|
|
- id: check-yaml
|
||
|
|
args:
|
||
|
|
- --allow-multiple-documents
|
||
|
|
- --unsafe
|
||
|
|
exclude: ^charts/
|
||
|
|
- id: check-toml
|
||
|
|
- id: check-case-conflict
|
||
|
|
- id: pyproject-fmt
|
||
|
|
- id: ruff
|
||
|
|
- id: ruff-format
|
||
|
|
- id: cargo-sort
|
||
|
|
exclude: ^(crates/kreuzberg-(wasm|node|py|php|ffi)|packages/(dart|swift)/rust)/Cargo\.toml$
|
||
|
|
- id: cargo-fmt
|
||
|
|
args:
|
||
|
|
- --all
|
||
|
|
- id: cargo-check
|
||
|
|
args:
|
||
|
|
- --workspace
|
||
|
|
- --exclude=kreuzberg-ffi
|
||
|
|
- --exclude=kreuzberg-py
|
||
|
|
- --exclude=kreuzberg-node
|
||
|
|
- --exclude=kreuzberg-php
|
||
|
|
- --exclude=kreuzberg-wasm
|
||
|
|
- --exclude=kreuzberg-dart
|
||
|
|
- --exclude=kreuzberg-swift
|
||
|
|
- --all-features
|
||
|
|
- --all-targets
|
||
|
|
- id: cargo-clippy
|
||
|
|
args:
|
||
|
|
- --fix
|
||
|
|
- --allow-dirty
|
||
|
|
- --allow-staged
|
||
|
|
- --workspace
|
||
|
|
- --exclude=kreuzberg-ffi
|
||
|
|
- --exclude=kreuzberg-py
|
||
|
|
- --exclude=kreuzberg-node
|
||
|
|
- --exclude=kreuzberg-php
|
||
|
|
- --exclude=kreuzberg-wasm
|
||
|
|
- --exclude=kreuzberg-dart
|
||
|
|
- --exclude=kreuzberg-swift
|
||
|
|
- --all-features
|
||
|
|
- --all-targets
|
||
|
|
- --
|
||
|
|
- -D
|
||
|
|
- warnings
|
||
|
|
- id: cargo-machete
|
||
|
|
args:
|
||
|
|
- crates/
|
||
|
|
- packages/
|
||
|
|
- tools/
|
||
|
|
exclude: ^e2e/
|
||
|
|
# - id: alef-docs-fresh # TEMP DISABLED — Step 0 lockdown active
|
||
|
|
- id: cargo-deny
|
||
|
|
args:
|
||
|
|
- check
|
||
|
|
- id: shfmt
|
||
|
|
args:
|
||
|
|
- -w
|
||
|
|
- -i
|
||
|
|
- '2'
|
||
|
|
- id: shellcheck
|
||
|
|
args:
|
||
|
|
- -x
|
||
|
|
- id: clang-format
|
||
|
|
args:
|
||
|
|
- --style=file
|
||
|
|
files: ^crates/kreuzberg-ffi/tests/c/
|
||
|
|
- id: clang-tidy
|
||
|
|
files: ^crates/kreuzberg-ffi/tests/c/
|
||
|
|
- id: checkstyle
|
||
|
|
args:
|
||
|
|
- -c
|
||
|
|
- packages/java/checkstyle.xml
|
||
|
|
- -p
|
||
|
|
- packages/java/checkstyle.properties
|
||
|
|
exclude: ^(\.mvn/wrapper/|e2e/|tools/e2e-generator/e2e/|crates/kreuzberg-wasm/e2e/|packages/java/src/)
|
||
|
|
- id: javadoc-lint
|
||
|
|
files: ^packages/java/src/main/.*\.java$
|
||
|
|
- id: java-verify
|
||
|
|
files: ^packages/java/
|
||
|
|
- id: mypy
|
||
|
|
files: ^(lib|src|kreuzberg|tools)/.*\.py$
|
||
|
|
exclude: e2e/|tests/|scripts/
|
||
|
|
- id: pydocstyle
|
||
|
|
files: ^packages/python/.*\.py$
|
||
|
|
exclude: ^packages/python/(tests/|.*_native\.py$)
|
||
|
|
- id: go-fmt
|
||
|
|
exclude: ^(e2e/|test_apps/|tools/)
|
||
|
|
- id: golangci-lint
|
||
|
|
exclude: ^(e2e/|test_apps/|tools/)
|
||
|
|
- id: govulncheck
|
||
|
|
exclude: ^(e2e/|test_apps/|tools/)
|
||
|
|
- id: rubocop
|
||
|
|
files: ^packages/ruby/.*\.rb$
|
||
|
|
- id: rubocop-lint
|
||
|
|
files: ^packages/ruby/.*\.(rb|rbs)$
|
||
|
|
- id: steep
|
||
|
|
files: ^packages/ruby/.*\.(rb|rbs)$
|
||
|
|
- id: dotnet-format
|
||
|
|
files: ^packages/csharp/.*\.cs$
|
||
|
|
- id: dotnet-format-check
|
||
|
|
files: ^packages/csharp/.*\.cs$
|
||
|
|
- id: cs-xmldoc-lint
|
||
|
|
files: ^packages/csharp/Kreuzberg/.*\.cs$
|
||
|
|
- id: php-cs-fixer
|
||
|
|
files: ^packages/php/.*\.php$
|
||
|
|
- id: phpstan
|
||
|
|
files: ^packages/php/.*\.php$
|
||
|
|
- id: phpdoc-lint
|
||
|
|
files: ^packages/php/src/.*\.php$
|
||
|
|
- id: mix-format
|
||
|
|
files: ^packages/elixir/
|
||
|
|
- id: mix-credo
|
||
|
|
files: ^packages/elixir/
|
||
|
|
- id: roxygen2-check
|
||
|
|
files: ^packages/r/R/.*\.R$
|
||
|
|
- id: air-format
|
||
|
|
files: ^packages/r/.*\.[Rr]$
|
||
|
|
- id: air-check
|
||
|
|
files: ^packages/r/.*\.[Rr]$
|
||
|
|
- id: lintr
|
||
|
|
files: ^packages/r/.*\.[Rr]$
|
||
|
|
- id: ktfmt
|
||
|
|
args:
|
||
|
|
- --kotlinlang-style
|
||
|
|
files: ^packages/kotlin-android/.*\.kts?$
|
||
|
|
- id: detekt
|
||
|
|
args:
|
||
|
|
- --build-upon-default-config
|
||
|
|
files: ^packages/kotlin-android/.*\.kts?$
|
||
|
|
- id: ktlint
|
||
|
|
files: ^packages/kotlin-android/.*\.kts?$
|
||
|
|
- id: swift-format
|
||
|
|
files: ^packages/swift/.*\.swift$
|
||
|
|
- id: swiftlint
|
||
|
|
files: ^packages/swift/.*\.swift$
|
||
|
|
- id: dart-format
|
||
|
|
files: ^packages/dart/.*\.dart$
|
||
|
|
- id: dart-analyze
|
||
|
|
files: ^packages/dart/.*\.dart$
|
||
|
|
- id: dart-doc-lint
|
||
|
|
files: ^packages/dart/lib/.*\.dart$
|
||
|
|
exclude: ^packages/dart/lib/src/rust/
|
||
|
|
- id: zig-fmt
|
||
|
|
files: ^packages/zig/.*\.zig$
|
||
|
|
- id: zig-build-check
|
||
|
|
files: ^packages/zig/.*\.zig$
|
||
|
|
- id: helm-lint
|
||
|
|
files: ^charts/.*/(Chart\.yaml|templates/.+\.ya?ml)$
|
||
|
|
- id: kubeconform
|
||
|
|
args:
|
||
|
|
- -strict
|
||
|
|
- -summary
|
||
|
|
files: ^charts/.*/templates/.+\.ya?ml$
|
||
|
|
exclude: ^charts/.*/(values|Chart)\.ya?ml$
|
||
|
|
- id: textlint
|
||
|
|
files: ^docs/.*\.md$
|
||
|
|
exclude: ^docs/(reference/|api-|snippets/|migration/)
|
||
|
|
args:
|
||
|
|
- --fix
|
||
|
|
- --config
|
||
|
|
- .textlintrc.json
|
||
|
|
- id: oxlint
|
||
|
|
- id: oxfmt
|
||
|
|
- id: cppcheck
|
||
|
|
- id: rumdl-fmt
|
||
|
|
exclude: ^templates/
|
||
|
|
- id: cpd
|
||
|
|
# - id: alef-verify # TEMP DISABLED — Step 0 lockdown active
|
||
|
|
# - id: alef-sync-versions # TEMP DISABLED — Step 0 lockdown active
|
||
|
|
- id: actionlint
|
||
|
|
- id: typos
|
||
|
|
args:
|
||
|
|
- --force-exclude
|