Skip to content

Commit

Permalink
Add warn-free clippy smoketest
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Jul 16, 2019
1 parent e127e2d commit 0cc8254
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
19 changes: 15 additions & 4 deletions azure/cargo-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 5 additions & 0 deletions azure/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cc8254

Please sign in to comment.