chore: add pre-commit
This commit is contained in:
parent
20b060475b
commit
7d95fb0674
2 changed files with 26 additions and 0 deletions
14
.editorconfig
Normal file
14
.editorconfig
Normal file
|
@ -0,0 +1,14 @@
|
|||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 88
|
||||
|
||||
[{Makefile,*.go}]
|
||||
indent_style = tab
|
||||
|
||||
[*.{json,md,rst,ini,yml,yaml,xml,html,js,jsx,ts,tsx,vue,kt}]
|
||||
indent_size = 2
|
12
.pre-commit-config.yaml
Normal file
12
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
|
||||
- repo: https://github.com/cathiele/pre-commit-rust
|
||||
rev: v0.1.0
|
||||
hooks:
|
||||
- id: cargo-fmt
|
||||
- id: cargo-clippy
|
||||
args: ["--all", "--tests", "--", "-D", "warnings"]
|
Loading…
Add table
Reference in a new issue