mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 14:28:22 +00:00
Merge pull request #85 from benesch/clippy
Enable Clippy and rustfmt in CI
This commit is contained in:
commit
5847a16fff
2 changed files with 11 additions and 4 deletions
|
@ -14,15 +14,22 @@ addons:
|
|||
- kalakris-cmake
|
||||
|
||||
rust:
|
||||
- nightly
|
||||
- stable
|
||||
|
||||
before_script:
|
||||
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
|
||||
- cargo install --force cargo-travis && export PATH=$HOME/.cargo/bin:$PATH
|
||||
- rustup component add clippy rustfmt
|
||||
|
||||
script:
|
||||
# Clippy must be run first, as its lints are only triggered during
|
||||
# compilation. Put another way: after a successful `cargo build`, `cargo
|
||||
# clippy` is guaranteed to produce no results. This bug is known upstream:
|
||||
# https://github.com/rust-lang/rust-clippy/issues/2604.
|
||||
- travis-cargo clippy -- --all-targets --all-features -- -D warnings
|
||||
- travis-cargo build
|
||||
- travis-cargo test
|
||||
- travis-cargo fmt -- -- --check
|
||||
|
||||
after_success:
|
||||
- cargo coveralls --verbose
|
||||
|
|
|
@ -1402,7 +1402,7 @@ fn parse_drop_table() {
|
|||
);
|
||||
assert_eq!(false, cascade);
|
||||
}
|
||||
_ => assert!(false),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
let sql = "DROP TABLE IF EXISTS foo, bar CASCADE";
|
||||
|
@ -1421,7 +1421,7 @@ fn parse_drop_table() {
|
|||
);
|
||||
assert_eq!(true, cascade);
|
||||
}
|
||||
_ => assert!(false),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
let sql = "DROP TABLE";
|
||||
|
@ -1450,7 +1450,7 @@ fn parse_drop_view() {
|
|||
);
|
||||
assert_eq!(SQLObjectType::View, object_type);
|
||||
}
|
||||
_ => assert!(false),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue