Skip to content

Commit

Permalink
Make CI fail on warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed Oct 14, 2018
1 parent 00402fe commit 8b36a76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ matrix:
- name: "Clippy"
rust: stable
before_script: rustup component add clippy-preview
script: cargo clippy --all --all-features -- -D clippy
script: cargo clippy --all -- -D clippy

- name: "rustfmt"
rust: stable
Expand All @@ -23,20 +23,20 @@ matrix:

- name: "warnings"
rust: stable
script: cargo check --tests --all-features
script: cargo check --all --features=fail-on-warnings

- name: "release"
rust: stable
script:
- cargo build --verbose --release
- cargo test --verbose --release
- cargo doc --verbose --release
- cargo build --verbose --all --release
- cargo test --verbose --all --release
- cargo doc --verbose --all --release

allow_failures:
- rust: nightly
fast_finish: true

script:
- cargo build --verbose
- cargo test --verbose
- cargo doc --verbose
- cargo build --all --verbose
- cargo test --all --verbose
- cargo doc --all --verbose
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name = "git-fuck"
version = "0.1.0"
authors = ["Sondre Nilsen <nilsen.sondre@gmail.com>"]

[features]
fail-on-warnings = []

[dependencies]
git2 = "0.7"
structopt = "0.2"
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
extern crate git2;

use git2::Repository;
Expand Down

0 comments on commit 8b36a76

Please sign in to comment.