[snowpatch] [PATCH] Treat build warnings as failures
Russell Currey
ruscur at russell.cc
Thu Apr 7 10:28:27 AEST 2016
Use #[deny(warnings)] to treat any warnings as build failures.
Add an exception to this for the structs that we will use once we can
parse Jenkins results.
Remove an unused dependency.
For C programmers, this is the equivalent of -Werror.
Signed-off-by: Russell Currey <ruscur at russell.cc>
---
src/git.rs | 2 --
src/main.rs | 3 +++
src/patchwork.rs | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/git.rs b/src/git.rs
index 79a9b92..413bd9e 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -87,8 +87,6 @@ pub fn apply_patch(repo: &Repository, path: &Path)
#[cfg(test)]
mod tests {
- use git::get_latest_commit;
-
#[test]
fn get_commit() {
}
diff --git a/src/main.rs b/src/main.rs
index 8077305..0f43785 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,6 +16,9 @@
// TODO: every unwrap() needs to be an unwrap_or_else() or similar
+// Equivalent of -Werror
+#![deny(warnings)]
+
extern crate hyper;
extern crate rustc_serialize;
extern crate git2;
diff --git a/src/patchwork.rs b/src/patchwork.rs
index ac67875..358f790 100644
--- a/src/patchwork.rs
+++ b/src/patchwork.rs
@@ -81,6 +81,8 @@ pub struct SeriesList {
pub results: Option<Vec<Series>>
}
+// TODO: remove this when we have Jenkins result handling
+#[allow(dead_code)]
pub enum TestState {
PENDING,
SUCCESS,
--
2.8.0
More information about the snowpatch
mailing list