File tree Expand file tree Collapse file tree
crates/gitbase-pgwire/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ repos :
2+ - repo : local
3+ hooks :
4+ - id : cargo-fmt
5+ name : cargo fmt (rustfmt)
6+ entry : cargo fmt --all
7+ language : system
8+ pass_filenames : false
9+ stages : [commit, push]
10+ - id : cargo-clippy
11+ name : cargo clippy (deny warnings)
12+ entry : cargo clippy --all-targets --all-features -- -D warnings
13+ language : system
14+ pass_filenames : false
15+ stages : [commit, push]
Original file line number Diff line number Diff line change @@ -31,6 +31,29 @@ GitDatabase é uma solução que indexa repositórios Git e expõe os dados em P
3131
3232---
3333
34+ ## Pre-commit (fmt + clippy)
35+
36+ Este repositório inclui hooks via ** pre-commit** para rodar ` cargo fmt ` e ` cargo clippy `
37+ antes de commitar e antes de fazer push.
38+
39+ ### Instalação
40+
41+ Instale o pre-commit (exemplos):
42+
43+ - ` pipx install pre-commit `
44+ - ` pip install --user pre-commit `
45+ - ` brew install pre-commit `
46+
47+ Depois, ative os hooks:
48+
49+ - ` pre-commit install --hook-type pre-commit --hook-type pre-push `
50+
51+ Para rodar manualmente em todos os arquivos:
52+
53+ - ` pre-commit run --all-files `
54+
55+ ---
56+
3457## Subindo o Postgres (Docker)
3558
3659``` bash
Original file line number Diff line number Diff line change @@ -137,9 +137,7 @@ impl GitbaseHandler {
137137 & self . blob_config ,
138138 )
139139 . await
140- . map_err ( |e| {
141- PgWireError :: ApiError ( Box :: new ( std:: io:: Error :: other ( e. to_string ( ) ) ) )
142- } ) ?;
140+ . map_err ( |e| PgWireError :: ApiError ( Box :: new ( std:: io:: Error :: other ( e. to_string ( ) ) ) ) ) ?;
143141
144142 Ok ( ( ) )
145143 }
You can’t perform that action at this time.
0 commit comments