Merge branch 'git-hook-format' into 'master'

git: add pre-commit hook: check format

See merge request clients/gecko!8
This commit is contained in:
Éloïs 2021-03-08 17:52:03 +00:00
commit 459a799057
3 changed files with 81 additions and 0 deletions

5
.rusty-hook.toml Normal file
View File

@ -0,0 +1,5 @@
[hooks]
pre-commit = "cargo fmt -- --check && flutter format --set-exit-if-changed lib packages/dubp_rs/lib/dubp.dart"
[logging]
verbose = true

75
Cargo.lock generated
View File

@ -85,6 +85,12 @@ dependencies = [
]
[[package]]
name = "autocfg"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "base64"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -166,6 +172,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "ci_info"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e"
dependencies = [
"envmnt",
]
[[package]]
name = "cipher"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -263,6 +278,7 @@ dependencies = [
"fast-threadpool",
"once_cell",
"parking_lot",
"rusty-hook",
"thiserror",
]
@ -299,6 +315,16 @@ dependencies = [
]
[[package]]
name = "envmnt"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059"
dependencies = [
"fsio",
"indexmap",
]
[[package]]
name = "fast-threadpool"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -319,6 +345,12 @@ dependencies = [
]
[[package]]
name = "fsio"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3"
[[package]]
name = "futures-micro"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -335,6 +367,15 @@ dependencies = [
]
[[package]]
name = "getopts"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
dependencies = [
"unicode-width",
]
[[package]]
name = "getrandom"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -352,6 +393,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "hashbrown"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
[[package]]
name = "heck"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -370,6 +417,16 @@ dependencies = [
]
[[package]]
name = "indexmap"
version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "instant"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -424,6 +481,12 @@ dependencies = [
]
[[package]]
name = "nias"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0"
[[package]]
name = "num_cpus"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@ -568,6 +631,18 @@ dependencies = [
]
[[package]]
name = "rusty-hook"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96cee9be61be7e1cbadd851e58ed7449c29c620f00b23df937cb9cbc04ac21a3"
dependencies = [
"ci_info",
"getopts",
"nias",
"toml",
]
[[package]]
name = "ryu"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"

View File

@ -23,3 +23,4 @@ dart-bindgen = "0.1.7"
[dev-dependencies]
assert_matches = "1.5.0"
rusty-hook = "^0.11.2"