12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- # See https://pre-commit.com for more information
- # pre-commit install
- # pre-commit install --hook-type commit-msg
- repos:
- - repo: local
- hooks:
- # allow for crate import granularity:
- # https://github.com/rust-lang/rustfmt/issues/4991
- - id: fmt
- name: fmt
- description: Format rust files.
- entry: cargo +nightly fmt
- language: system
- types: [rust]
- args: ["--all", "--", "--check"]
- - id: cargo-check
- name: cargo check
- description: Check the package for errors.
- entry: cargo check
- language: system
- types: [rust]
- pass_filenames: false
- - id: clippy
- name: clippy
- description: Lint via clippy
- entry: cargo clippy
- language: system
- args: ["--workspace", "--", "-D", "warnings"]
- types: [rust]
- pass_filenames: false
- - repo: https://github.com/DevinR528/cargo-sort
- rev: v1.0.9
- hooks:
- - id: cargo-sort
- args: ["-w"]
- - repo: https://github.com/compilerla/conventional-pre-commit
- rev: v2.1.1
- hooks:
- - id: conventional-pre-commit
- stages:
- - commit-msg
- - repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.3.0
- hooks:
- - id: no-commit-to-branch
- args: ["-b", "main"]
- - id: check-merge-conflict
- - id: trailing-whitespace
- - id: end-of-file-fixer
- - id: check-yaml
- exclude: ^catalog-info.yaml
- - id: check-json
- exclude: ^tests/data/
- - id: check-added-large-files
- - id: detect-private-key
- exclude: ^tests/data/
- - id: check-executables-have-shebangs
- - id: check-toml
|