From 317726975c3231f95935ce9b85566ad721ab8a1d Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Wed, 9 Sep 2020 21:53:25 +0100 Subject: [PATCH] Add and setup rusty-hook --- .rusty-hook.toml | 6 +++++ Cargo.lock | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 9 ++++++- 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 .rusty-hook.toml diff --git a/.rusty-hook.toml b/.rusty-hook.toml new file mode 100644 index 0000000..5b10338 --- /dev/null +++ b/.rusty-hook.toml @@ -0,0 +1,6 @@ +[hooks] +pre-commit = "cargo fmt -- --check" +pre-push = "cargo test" + +[logging] +verbose = true diff --git a/Cargo.lock b/Cargo.lock index 58f57e3..8455bfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,6 +44,15 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "ci_info" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e" +dependencies = [ + "envmnt", +] + [[package]] name = "clap" version = "3.0.0-beta.1" @@ -92,6 +101,31 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +[[package]] +name = "envmnt" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059" +dependencies = [ + "fsio", + "indexmap", +] + +[[package]] +name = "fsio" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3" + +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] + [[package]] name = "heck" version = "0.3.1" @@ -189,6 +223,12 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +[[package]] +name = "nias" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" + [[package]] name = "once_cell" version = "1.4.0" @@ -293,6 +333,18 @@ version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" +[[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 = "scopeguard" version = "1.1.0" @@ -314,12 +366,19 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "serde" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" + [[package]] name = "serene" version = "0.1.0" dependencies = [ "clap", "inkwell", + "rusty-hook", ] [[package]] @@ -383,6 +442,15 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +dependencies = [ + "serde", +] + [[package]] name = "unicode-segmentation" version = "1.6.0" diff --git a/Cargo.toml b/Cargo.toml index 7009113..870b7fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,9 +3,16 @@ name = "serene" version = "0.1.0" authors = ["Sameer Rahmani "] edition = "2018" +repository = "https://gitlab.com/serene-lang/serene" +homepage = "https://serene-lang.org" +license = "GPL-2.0" +license-file = "LICENSE" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] clap = { version = "3.0.0-beta.1", features = ["yaml"] } -inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm10-0" } \ No newline at end of file +inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm10-0" } + +[dev-dependencies] +rusty-hook = "^0.11.2" \ No newline at end of file