2024-07-18 11:01:02 -07:00
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
|
rev: v4.6.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: check-yaml
|
2024-09-18 20:03:26 -07:00
|
|
|
exclude: envoyfilter/envoy.template.yaml
|
2024-07-18 11:01:02 -07:00
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: cargo-fmt
|
|
|
|
|
name: cargo-fmt
|
|
|
|
|
language: system
|
|
|
|
|
types: [file, rust]
|
2024-07-23 23:53:02 -07:00
|
|
|
entry: bash -c "cd envoyfilter && cargo fmt -p intelligent-prompt-gateway -- --check"
|
2024-07-18 11:01:02 -07:00
|
|
|
- id: cargo-clippy
|
|
|
|
|
name: cargo-clippy
|
|
|
|
|
language: system
|
|
|
|
|
types: [file, rust]
|
2024-07-30 16:23:23 -07:00
|
|
|
entry: bash -c "cd envoyfilter && cargo clippy -p intelligent-prompt-gateway --all"
|
2024-07-18 11:01:02 -07:00
|
|
|
- id: cargo-test
|
|
|
|
|
name: cargo-test
|
|
|
|
|
language: system
|
|
|
|
|
types: [file, rust]
|
2024-07-23 23:53:02 -07:00
|
|
|
# --lib is to only test the library, since when integration tests are made,
|
2024-07-18 14:20:33 -07:00
|
|
|
# they will be in a seperate tests directory
|
2024-07-30 16:23:23 -07:00
|
|
|
entry: bash -c "cd envoyfilter && cargo test -p intelligent-prompt-gateway --lib"
|