diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8e92d1ebd7500fe834bd99bee63011438a50ebd..6a165c893202fa99e7201e56ccc3a55894e2bbcb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ build:stable: tags: - redshift-rs-stable script: - - cargo build + - cargo build --all-features tests:stable: stage: tests diff --git a/crypto/Cargo.toml b/crypto/Cargo.toml index 2ff539e5d6aa10f1124958d6b9d98290c8b8ae79..388d5e894d195439cb3d95f114487546df0c6f0d 100644 --- a/crypto/Cargo.toml +++ b/crypto/Cargo.toml @@ -14,4 +14,8 @@ path = "lib.rs" [dependencies] base58 = "0.1.0" base64 = "0.8.0" -rust-crypto = "0.2.36" \ No newline at end of file +rust-crypto = "0.2.36" + +[features] +# Treat warnings as a build error. +strict = [] \ No newline at end of file diff --git a/crypto/lib.rs b/crypto/lib.rs index d15f775578669fa2fc4821b9e48d8c16ebe4af18..fc0ac35e9a25d309d8ea6b10c143202e9cb1294b 100644 --- a/crypto/lib.rs +++ b/crypto/lib.rs @@ -15,6 +15,7 @@ //! Provide wrappers for cryptographic building blocks used by Duniter. +#![cfg_attr(feature = "strict", deny(warnings))] #![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, unused_qualifications)] diff --git a/protocol/Cargo.toml b/protocol/Cargo.toml index 0bdca9af799e722a32da1bb372834c98b766e715..3aa7b33d756200ce050c8c86c5eace8f758c83b9 100644 --- a/protocol/Cargo.toml +++ b/protocol/Cargo.toml @@ -19,3 +19,7 @@ base64 = "0.8.0" lazy_static = "1.0.0" regex = "0.2" duniter-crypto = { path = "../crypto" } + +[features] +# Treat warnings as a build error. +strict = [] \ No newline at end of file diff --git a/protocol/lib.rs b/protocol/lib.rs index c33934d42f43bb28863baa913d5bd80735f0de2a..c43b039739514747443a0d096d9481790dfc98f8 100644 --- a/protocol/lib.rs +++ b/protocol/lib.rs @@ -15,6 +15,7 @@ //! Implements the Duniter Protocol. +#![cfg_attr(feature = "strict", deny(warnings))] #![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, unused_qualifications)] diff --git a/wotb/Cargo.toml b/wotb/Cargo.toml index dc81a5a31760a3ec732ca17ce0cca25e620cfa35..eb0f10ad90d2d9f7940e90b75a6874f9165934de 100644 --- a/wotb/Cargo.toml +++ b/wotb/Cargo.toml @@ -17,3 +17,7 @@ serde_derive = "1.0.24" bincode = "0.9.2" byteorder = "1.2.1" rayon = "1.0.0" + +[features] +# Treat warnings as a build error. +strict = [] \ No newline at end of file diff --git a/wotb/lib.rs b/wotb/lib.rs index bcc07a8a034f8842060756f540132dd862b99164..8cd0cf6a1323f2f2beb791076ef453ac87bc5507 100644 --- a/wotb/lib.rs +++ b/wotb/lib.rs @@ -26,6 +26,7 @@ //! //! [js-tests]: https://github.com/duniter/wotb/blob/master/wotcpp/webOfTrust.cpp +#![cfg_attr(feature = "strict", deny(warnings))] #![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, unused_qualifications)]