From 0198a8612c0f452e7b5643842d695c58c27ca3b9 Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Sat, 6 Mar 2021 13:25:59 -0800 Subject: [PATCH] Move deny warnings to CI What is nice about this is that we deny warnings for the stable version of Rust that we support, and we ignore warnings for the nightly version, which has more changes more often. Closes #189 --- cloudbuild.yaml | 2 +- src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index bed0a77fec..5d9a7b4f7c 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -31,7 +31,7 @@ steps: # that it skips checking some files that were built previously. As a result # we run it before other cargo sub-commands to ensure that it checks all files. - name: gcr.io/$PROJECT_ID/ci - args: ["clippy", "--tests"] + args: ["clippy", "--tests", "--", "-D", "warnings"] id: clippy - name: gcr.io/$PROJECT_ID/ci args: ["fmt", "--", "--check"] diff --git a/src/lib.rs b/src/lib.rs index b1d894ae39..8a90a44b70 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,8 +14,6 @@ * limitations under the License. */ -// Fail the build if clippy finds any warnings. -#![deny(warnings)] // Running external documentation tests depends on the // `external_doc` unstable feature only available on a // nightly compiler. So we enable the feature only when needed.