mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
ci: pre-commit configuration and hooks (#261)
* feat: adds pre-commit config and hooks * refactor: sort all Cargo.toml by cargo-sort * ci: adds conventional-pre-commit hook to pre-commit * fix: remove .pre-commit-hooks.yaml * fix: readme * Update .pre-commit-config.yaml Co-authored-by: Lei, Huang <6406592+v0y4g3r@users.noreply.github.com> * ci: move clippy hook to push stage * docs: install pre-push github hook Co-authored-by: Lei, Huang <6406592+v0y4g3r@users.noreply.github.com>
This commit is contained in:
21
.pre-commit-config.yaml
Normal file
21
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
repos:
|
||||
- repo: https://github.com/compilerla/conventional-pre-commit
|
||||
rev: 47923ce11be4a936cd216d427d985dd342adb751
|
||||
hooks:
|
||||
- id: conventional-pre-commit
|
||||
stages: [commit-msg]
|
||||
|
||||
- repo: https://github.com/DevinR528/cargo-sort
|
||||
rev: e6a795bc6b2c0958f9ef52af4863bbd7cc17238f
|
||||
hooks:
|
||||
- id: cargo-sort
|
||||
args: ["--workspace"]
|
||||
|
||||
- repo: https://github.com/doublify/pre-commit-rust
|
||||
rev: v1.0
|
||||
hooks:
|
||||
- id: fmt
|
||||
- id: clippy
|
||||
args: ["--workspace", "--all-targets", "--", "-D", "warnings", "-D", "clippy::print_stdout", "-D", "clippy::print_stderr"]
|
||||
stages: [push]
|
||||
- id: cargo-check
|
||||
Reference in New Issue
Block a user