From 0cc825406a01f5c40b199b689a9ed7f06f908639 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Tue, 16 Jul 2019 10:33:34 -0400 Subject: [PATCH] Add warn-free clippy smoketest --- azure/cargo-clippy.yml | 19 +++++++++++++++---- azure/style.yml | 5 +++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/azure/cargo-clippy.yml b/azure/cargo-clippy.yml index 3d401cb..abca6ff 100644 --- a/azure/cargo-clippy.yml +++ b/azure/cargo-clippy.yml @@ -2,13 +2,20 @@ parameters: rust: stable allow_fail: false setup: [] + fail_all: false jobs: - job: ${{ parameters.name }} ${{ if eq(parameters.rust, 'stable') }}: - displayName: cargo clippy + ${{ if eq(parameters.fail_all, 'true') }}: + displayName: cargo clippy -- -D warnings + ${{ if ne(parameters.fail_all, 'true') }}: + displayName: cargo clippy ${{ if ne(parameters.rust, 'stable') }}: - displayName: cargo +${{ parameters.rust }} clippy + ${{ if eq(parameters.fail_all, 'true') }}: + displayName: cargo +${{ parameters.rust }} clippy -- -D warnings + ${{ if ne(parameters.fail_all, 'true') }}: + displayName: cargo +${{ parameters.rust }} clippy continueOnError: ${{ parameters.allow_fail }} pool: vmImage: ubuntu-16.04 @@ -19,5 +26,9 @@ jobs: setup: ${{ parameters.setup }} components: - clippy - - script: cargo clippy --all - displayName: Run clippy + - ${{ if eq(parameters.fail_all, 'true') }}: + - script: cargo clippy --all -- -D warnings + displayName: Run strict clippy + - ${{ if ne(parameters.fail_all, 'true') }}: + - script: cargo clippy --all + displayName: Run strict clippy diff --git a/azure/style.yml b/azure/style.yml index 821a9a7..aa4c899 100644 --- a/azure/style.yml +++ b/azure/style.yml @@ -14,6 +14,11 @@ jobs: parameters: name: clippy setup: ${{ parameters.setup }} + - template: cargo-clippy.yml + parameters: + name: clippy_nowarnings + fail_all: true + allow_fail: true - template: cargo-clippy.yml parameters: name: clippy_beta