diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-06-17 09:19:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-17 09:19:30 +0000 |
commit | 5ba34d4f9766a55a06ed5e3e44cc384af1b09f65 (patch) | |
tree | 11965fbe66f5d25ea00be1a02e74b724c4071d3c /src | |
parent | 0f700a01bd73623cdfc0afc4a54f9e82f46d8f49 (diff) | |
download | alacritty-5ba34d4f9766a55a06ed5e3e44cc384af1b09f65.tar.gz alacritty-5ba34d4f9766a55a06ed5e3e44cc384af1b09f65.zip |
Move to cargo clippy
Using clippy as a library has been deprecated, instead the `cargo
clippy` command should be used instead. To comply with this change
clippy has been removed from the `Cargo.toml` and is now installed with
cargo when building in CI.
This has also lead to a few new clippy issues to show up, this includes
everything in the `font` subdirectory. This has been fixed and `font`
should now be covered by clippy CI too.
This also upgrades all dependencies, as a result this fixes #1341 and
this fixes #1344.
Diffstat (limited to 'src')
-rw-r--r-- | src/config.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 8 | ||||
-rw-r--r-- | src/locale.rs | 1 | ||||
-rw-r--r-- | src/logging.rs | 2 | ||||
-rw-r--r-- | src/main.rs | 7 | ||||
-rw-r--r-- | src/tty.rs | 2 |
6 files changed, 7 insertions, 15 deletions
diff --git a/src/config.rs b/src/config.rs index 88a14b22..ed69ec5d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1735,7 +1735,7 @@ mod tests { } } -#[cfg_attr(feature = "clippy", allow(enum_variant_names))] +#[cfg_attr(feature = "cargo-clippy", allow(enum_variant_names))] #[derive(Deserialize, Copy, Clone)] enum Key { Key1, @@ -13,12 +13,7 @@ // limitations under the License. // //! Alacritty - The GPU Enhanced Terminal -#![cfg_attr(feature = "clippy", feature(plugin))] -#![cfg_attr(feature = "clippy", plugin(clippy))] -#![cfg_attr(feature = "clippy", deny(clippy))] -#![cfg_attr(feature = "clippy", deny(enum_glob_use))] -#![cfg_attr(feature = "clippy", deny(if_not_else))] -#![cfg_attr(feature = "clippy", deny(wrong_pub_self_convention))] +#![cfg_attr(feature = "cargo-clippy", deny(clippy, if_not_else, enum_glob_use, wrong_pub_self_convention))] #![cfg_attr(feature = "nightly", feature(core_intrinsics))] #![cfg_attr(all(test, feature = "bench"), feature(test))] @@ -121,5 +116,6 @@ impl Mul<f32> for Rgb { #[allow(unused_mut)] pub mod gl { #![allow(non_upper_case_globals)] + #![cfg_attr(feature = "cargo-clippy", allow(clippy))] include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs")); } diff --git a/src/locale.rs b/src/locale.rs index 9fcd2db2..bea68cad 100644 --- a/src/locale.rs +++ b/src/locale.rs @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#![cfg_attr(feature = "cargo-clippy", allow(let_unit_value))] #![cfg(target_os = "macos")] use libc::{LC_CTYPE, setlocale}; use std::ffi::{CString, CStr}; diff --git a/src/logging.rs b/src/logging.rs index 5691eb78..a691778a 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -29,7 +29,7 @@ pub struct Logger<T> { impl<T: Send + io::Write> Logger<T> { // False positive, see: https://github.com/rust-lang-nursery/rust-clippy/issues/734 - #[cfg_attr(feature = "clippy", allow(new_ret_no_self))] + #[cfg_attr(feature = "cargo-clippy", allow(new_ret_no_self))] pub fn new(output: T, level: log::LevelFilter) -> Logger<io::LineWriter<T>> { log::set_max_level(level); Logger { diff --git a/src/main.rs b/src/main.rs index c45dfda5..b0e507e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,12 +13,7 @@ // limitations under the License. // //! Alacritty - The GPU Enhanced Terminal -#![cfg_attr(feature = "clippy", feature(plugin))] -#![cfg_attr(feature = "clippy", plugin(clippy))] -#![cfg_attr(feature = "clippy", deny(clippy))] -#![cfg_attr(feature = "clippy", deny(enum_glob_use))] -#![cfg_attr(feature = "clippy", deny(if_not_else))] -#![cfg_attr(feature = "clippy", deny(wrong_pub_self_convention))] +#![cfg_attr(feature = "cargo-clippy", deny(clippy, if_not_else, enum_glob_use, wrong_pub_self_convention))] #![cfg_attr(feature = "nightly", feature(core_intrinsics))] #![cfg_attr(all(test, feature = "bench"), feature(test))] @@ -117,7 +117,7 @@ fn set_controlling_terminal(fd: c_int) { // based on architecture (32/64). So a generic cast is used to make sure // there are no issues. To allow such a generic cast the clippy warning // is disabled. - #[cfg_attr(feature = "clippy", allow(cast_lossless))] + #[cfg_attr(feature = "cargo-clippy", allow(cast_lossless))] libc::ioctl(fd, TIOCSCTTY as _, 0) }; |