From daf5f9d39f352a22932acfb0f8bfb23edf1b5cbd Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Thu, 25 Aug 2022 18:42:43 -0700 Subject: [PATCH] Add crate-wide config to all crates; customize clippy settings Enable checking of excessive bool parameters in all crates, and limit to 1. Limit the number of arguments to 5. Signed-off-by: J Robert Ray --- .clippy.toml | 5 +++++ crates/parsedbuf/src/lib.rs | 1 + crates/spfs-cli/cmd-clean/src/cmd_clean.rs | 3 +++ crates/spfs-cli/cmd-enter/src/cmd_enter.rs | 3 +++ crates/spfs-cli/cmd-join/src/cmd_join.rs | 3 +++ crates/spfs-cli/cmd-monitor/src/cmd_monitor.rs | 3 +++ crates/spfs-cli/common/src/lib.rs | 3 +++ crates/spfs-cli/main/src/bin.rs | 3 +++ crates/spfs-cli/main/src/cmd_write.rs | 1 + crates/spfs-encoding/src/lib.rs | 1 + crates/spfs/src/bootstrap.rs | 1 + crates/spfs/src/config.rs | 1 + crates/spfs/src/error.rs | 1 + crates/spfs/src/lib.rs | 5 +++-- crates/spfs/src/proto/conversions.rs | 1 + crates/spfs/src/proto/mod.rs | 1 + crates/spfs/src/resolve_test.rs | 5 +++-- crates/spfs/src/server/database.rs | 1 + crates/spfs/src/server/mod.rs | 1 + crates/spfs/src/server/tag.rs | 1 + crates/spfs/src/storage/config.rs | 1 + crates/spfs/src/storage/database_test.rs | 1 + crates/spfs/src/storage/payload_test.rs | 1 + crates/spfs/src/storage/repository.rs | 1 + crates/spfs/src/storage/rpc/mod.rs | 1 + crates/spfs/src/storage/rpc/payload.rs | 1 + crates/spfs/src/storage/tag_test.rs | 1 + crates/spk-build/src/build/mod.rs | 1 + crates/spk-build/src/build/sources_test.rs | 1 + crates/spk-build/src/lib.rs | 3 +++ crates/spk-cli/cmd-build/src/lib.rs | 1 + crates/spk-cli/cmd-convert/src/lib.rs | 1 + crates/spk-cli/cmd-env/src/cmd_env.rs | 1 + crates/spk-cli/cmd-env/src/lib.rs | 1 + crates/spk-cli/cmd-explain/src/lib.rs | 1 + crates/spk-cli/cmd-install/src/lib.rs | 1 + crates/spk-cli/cmd-make-binary/src/lib.rs | 1 + crates/spk-cli/cmd-make-source/src/lib.rs | 1 + crates/spk-cli/cmd-render/src/cmd_render.rs | 4 ++++ crates/spk-cli/cmd-render/src/lib.rs | 1 + crates/spk-cli/cmd-repo/src/lib.rs | 1 + crates/spk-cli/cmd-test/src/cmd_test.rs | 1 + crates/spk-cli/cmd-test/src/lib.rs | 1 + crates/spk-cli/common/src/cli.rs | 1 + crates/spk-cli/common/src/lib.rs | 1 + crates/spk-cli/group1/src/cmd_deprecate.rs | 1 + crates/spk-cli/group1/src/lib.rs | 1 + crates/spk-cli/group2/src/cmd_new.rs | 1 + crates/spk-cli/group2/src/cmd_publish.rs | 1 + crates/spk-cli/group2/src/cmd_remove.rs | 1 + crates/spk-cli/group2/src/lib.rs | 1 + crates/spk-cli/group3/src/lib.rs | 1 + crates/spk-cli/group4/src/lib.rs | 1 + crates/spk-exec/src/lib.rs | 3 +++ crates/spk-schema/crates/foundation/src/ident_build/build.rs | 1 + .../crates/foundation/src/ident_component/component_spec.rs | 1 + .../foundation/src/ident_component/component_spec_test.rs | 1 + crates/spk-schema/crates/foundation/src/lib.rs | 1 + crates/spk-schema/crates/foundation/src/option_map/mod.rs | 1 + .../crates/foundation/src/spec_ops/file_matcher_test.rs | 1 + crates/spk-schema/crates/foundation/src/version/compat.rs | 1 + .../spk-schema/crates/foundation/src/version/version_test.rs | 1 + crates/spk-schema/crates/ident/src/ident_any_test.rs | 1 + crates/spk-schema/crates/ident/src/lib.rs | 3 +++ crates/spk-schema/crates/ident/src/range_ident_test.rs | 1 + crates/spk-schema/crates/ident/src/request.rs | 1 + crates/spk-schema/crates/validators/src/lib.rs | 3 +++ crates/spk-schema/src/build_spec.rs | 1 + crates/spk-schema/src/build_spec_test.rs | 1 + crates/spk-schema/src/component_spec.rs | 1 + crates/spk-schema/src/component_spec_list.rs | 1 + crates/spk-schema/src/component_spec_list_test.rs | 1 + crates/spk-schema/src/component_spec_test.rs | 1 + crates/spk-schema/src/embedded_packages_list.rs | 1 + crates/spk-schema/src/embedded_packages_list_test.rs | 1 + crates/spk-schema/src/environ.rs | 1 + crates/spk-schema/src/environ_test.rs | 1 + crates/spk-schema/src/error_test.rs | 1 + crates/spk-schema/src/install_spec.rs | 1 + crates/spk-schema/src/lib.rs | 3 +++ crates/spk-schema/src/option.rs | 1 + crates/spk-schema/src/option_test.rs | 1 + crates/spk-schema/src/requirements_list_test.rs | 1 + crates/spk-schema/src/source_spec.rs | 1 + crates/spk-schema/src/source_spec_test.rs | 1 + crates/spk-schema/src/spec_test.rs | 3 +++ crates/spk-schema/src/v0/spec.rs | 1 + crates/spk-schema/src/version_range_test.rs | 1 + crates/spk-solve/crates/graph/src/graph_test.rs | 1 + crates/spk-solve/crates/graph/src/lib.rs | 3 +++ .../spk-solve/crates/package-iterator/src/build_key_test.rs | 1 + crates/spk-solve/crates/package-iterator/src/lib.rs | 3 +++ crates/spk-solve/crates/solution/src/lib.rs | 3 +++ crates/spk-solve/crates/solution/src/solution.rs | 1 + .../crates/validation/src/impossible_checks_test.rs | 1 + crates/spk-solve/crates/validation/src/lib.rs | 3 +++ crates/spk-solve/crates/validation/src/validation_test.rs | 1 + crates/spk-solve/src/lib.rs | 3 +++ crates/spk-solve/src/solver.rs | 1 + crates/spk-solve/src/solver_test.rs | 1 + crates/spk-storage/src/lib.rs | 3 +++ crates/spk-storage/src/storage/archive.rs | 1 + crates/spk-storage/src/storage/mem.rs | 1 + crates/spk-storage/src/storage/repository.rs | 1 + crates/spk-storage/src/storage/runtime.rs | 1 + crates/spk-storage/src/storage/spfs.rs | 1 + crates/spk/src/cli.rs | 4 ++++ crates/spk/src/lib.rs | 1 + 108 files changed, 158 insertions(+), 4 deletions(-) create mode 100644 .clippy.toml diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 0000000000..daa211348c --- /dev/null +++ b/.clippy.toml @@ -0,0 +1,5 @@ +# default is 3 +max-fn-params-bools = 1 + +# default is 7 +too-many-arguments-threshold = 5 \ No newline at end of file diff --git a/crates/parsedbuf/src/lib.rs b/crates/parsedbuf/src/lib.rs index ef0f2cb648..2ed0f4c817 100644 --- a/crates/parsedbuf/src/lib.rs +++ b/crates/parsedbuf/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub use paste; diff --git a/crates/spfs-cli/cmd-clean/src/cmd_clean.rs b/crates/spfs-cli/cmd-clean/src/cmd_clean.rs index c5acaeabb1..9a00faf36b 100644 --- a/crates/spfs-cli/cmd-clean/src/cmd_clean.rs +++ b/crates/spfs-cli/cmd-clean/src/cmd_clean.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + use chrono::prelude::*; use clap::Parser; use colored::*; diff --git a/crates/spfs-cli/cmd-enter/src/cmd_enter.rs b/crates/spfs-cli/cmd-enter/src/cmd_enter.rs index e6a40c41b1..e08d99879b 100644 --- a/crates/spfs-cli/cmd-enter/src/cmd_enter.rs +++ b/crates/spfs-cli/cmd-enter/src/cmd_enter.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + use std::ffi::OsString; use clap::Parser; diff --git a/crates/spfs-cli/cmd-join/src/cmd_join.rs b/crates/spfs-cli/cmd-join/src/cmd_join.rs index db26914008..3c7768f16e 100644 --- a/crates/spfs-cli/cmd-join/src/cmd_join.rs +++ b/crates/spfs-cli/cmd-join/src/cmd_join.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + use std::ffi::OsString; use clap::Parser; diff --git a/crates/spfs-cli/cmd-monitor/src/cmd_monitor.rs b/crates/spfs-cli/cmd-monitor/src/cmd_monitor.rs index 030f26cf61..77aa01b909 100644 --- a/crates/spfs-cli/cmd-monitor/src/cmd_monitor.rs +++ b/crates/spfs-cli/cmd-monitor/src/cmd_monitor.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + use std::time::Duration; use clap::Parser; diff --git a/crates/spfs-cli/common/src/lib.rs b/crates/spfs-cli/common/src/lib.rs index 374ef0f90b..e0714ccf3b 100644 --- a/crates/spfs-cli/common/src/lib.rs +++ b/crates/spfs-cli/common/src/lib.rs @@ -1,3 +1,6 @@ +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + //! Common macros and argument structures for the spfs command line mod args; diff --git a/crates/spfs-cli/main/src/bin.rs b/crates/spfs-cli/main/src/bin.rs index e2fd138630..eff2940461 100644 --- a/crates/spfs-cli/main/src/bin.rs +++ b/crates/spfs-cli/main/src/bin.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + use clap::{Parser, Subcommand}; use spfs::Error; diff --git a/crates/spfs-cli/main/src/cmd_write.rs b/crates/spfs-cli/main/src/cmd_write.rs index 4d2ae671d6..f54a58b95e 100644 --- a/crates/spfs-cli/main/src/cmd_write.rs +++ b/crates/spfs-cli/main/src/cmd_write.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::path::PathBuf; use clap::Args; diff --git a/crates/spfs-encoding/src/lib.rs b/crates/spfs-encoding/src/lib.rs index 323cb264cb..b0fc683a75 100644 --- a/crates/spfs-encoding/src/lib.rs +++ b/crates/spfs-encoding/src/lib.rs @@ -12,6 +12,7 @@ #![deny(missing_docs)] #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] mod binary; mod error; diff --git a/crates/spfs/src/bootstrap.rs b/crates/spfs/src/bootstrap.rs index 9fb72e18b4..3b7bb70991 100644 --- a/crates/spfs/src/bootstrap.rs +++ b/crates/spfs/src/bootstrap.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::ffi::{OsStr, OsString}; use std::path::{Path, PathBuf}; diff --git a/crates/spfs/src/config.rs b/crates/spfs/src/config.rs index 0120ac9f38..3352d57902 100644 --- a/crates/spfs/src/config.rs +++ b/crates/spfs/src/config.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::path::PathBuf; use std::sync::{Arc, RwLock}; diff --git a/crates/spfs/src/error.rs b/crates/spfs/src/error.rs index 25f863b000..78d258f747 100644 --- a/crates/spfs/src/error.rs +++ b/crates/spfs/src/error.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::io; use std::str::Utf8Error; diff --git a/crates/spfs/src/lib.rs b/crates/spfs/src/lib.rs index 645ce1d404..41997db65f 100644 --- a/crates/spfs/src/lib.rs +++ b/crates/spfs/src/lib.rs @@ -2,9 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk -//! Filesystem isolation, capture and distribution. - #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + +//! Filesystem isolation, capture and distribution. pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/crates/spfs/src/proto/conversions.rs b/crates/spfs/src/proto/conversions.rs index f1c0732d84..1671d98a1c 100644 --- a/crates/spfs/src/proto/conversions.rs +++ b/crates/spfs/src/proto/conversions.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::convert::{TryFrom, TryInto}; use std::ops::Not; diff --git a/crates/spfs/src/proto/mod.rs b/crates/spfs/src/proto/mod.rs index c583b3c591..3a27c8feee 100644 --- a/crates/spfs/src/proto/mod.rs +++ b/crates/spfs/src/proto/mod.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + //! Protocol Buffer message formats and conversions. mod conversions; diff --git a/crates/spfs/src/resolve_test.rs b/crates/spfs/src/resolve_test.rs index fe84caaa59..ff5b3d46b3 100644 --- a/crates/spfs/src/resolve_test.rs +++ b/crates/spfs/src/resolve_test.rs @@ -1,8 +1,9 @@ -use std::sync::Arc; - // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + +use std::sync::Arc; + use rstest::rstest; use super::resolve_stack_to_layers; diff --git a/crates/spfs/src/server/database.rs b/crates/spfs/src/server/database.rs index 954e3e691d..f8437506ef 100644 --- a/crates/spfs/src/server/database.rs +++ b/crates/spfs/src/server/database.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::convert::TryInto; use std::pin::Pin; use std::sync::Arc; diff --git a/crates/spfs/src/server/mod.rs b/crates/spfs/src/server/mod.rs index 2490a27d36..a8c4a76d8b 100644 --- a/crates/spfs/src/server/mod.rs +++ b/crates/spfs/src/server/mod.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + //! Remote rpc server implementation of the spfs repository mod database; mod payload; diff --git a/crates/spfs/src/server/tag.rs b/crates/spfs/src/server/tag.rs index caaedb468b..1bc1f45a63 100644 --- a/crates/spfs/src/server/tag.rs +++ b/crates/spfs/src/server/tag.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::convert::TryInto; use std::sync::Arc; diff --git a/crates/spfs/src/storage/config.rs b/crates/spfs/src/storage/config.rs index fac55b89b2..6aa92e5298 100644 --- a/crates/spfs/src/storage/config.rs +++ b/crates/spfs/src/storage/config.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use async_trait::async_trait; use crate::Result; diff --git a/crates/spfs/src/storage/database_test.rs b/crates/spfs/src/storage/database_test.rs index 0f4a2db536..67f1b55c98 100644 --- a/crates/spfs/src/storage/database_test.rs +++ b/crates/spfs/src/storage/database_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use crate::fixtures::*; diff --git a/crates/spfs/src/storage/payload_test.rs b/crates/spfs/src/storage/payload_test.rs index 4179552301..328293f0f9 100644 --- a/crates/spfs/src/storage/payload_test.rs +++ b/crates/spfs/src/storage/payload_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use futures::TryStreamExt; use rstest::rstest; use tokio::io::AsyncReadExt; diff --git a/crates/spfs/src/storage/repository.rs b/crates/spfs/src/storage/repository.rs index 805ecec19f..49b7019ca8 100644 --- a/crates/spfs/src/storage/repository.rs +++ b/crates/spfs/src/storage/repository.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::HashSet; use std::pin::Pin; diff --git a/crates/spfs/src/storage/rpc/mod.rs b/crates/spfs/src/storage/rpc/mod.rs index 682a5e801d..1ec2448d37 100644 --- a/crates/spfs/src/storage/rpc/mod.rs +++ b/crates/spfs/src/storage/rpc/mod.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + //! Storage implementation which is a client of the built-in spfs server mod database; diff --git a/crates/spfs/src/storage/rpc/payload.rs b/crates/spfs/src/storage/rpc/payload.rs index acaa325cfa..28d2e41fbd 100644 --- a/crates/spfs/src/storage/rpc/payload.rs +++ b/crates/spfs/src/storage/rpc/payload.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::convert::TryInto; use std::pin::Pin; diff --git a/crates/spfs/src/storage/tag_test.rs b/crates/spfs/src/storage/tag_test.rs index 11beb23e8f..33ddfbe548 100644 --- a/crates/spfs/src/storage/tag_test.rs +++ b/crates/spfs/src/storage/tag_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::os::unix::fs::MetadataExt; use chrono::prelude::*; diff --git a/crates/spk-build/src/build/mod.rs b/crates/spk-build/src/build/mod.rs index cdc3863ef5..be29e897c2 100644 --- a/crates/spk-build/src/build/mod.rs +++ b/crates/spk-build/src/build/mod.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + mod binary; mod sources; diff --git a/crates/spk-build/src/build/sources_test.rs b/crates/spk-build/src/build/sources_test.rs index 09977bd50b..f6293a2ecf 100644 --- a/crates/spk-build/src/build/sources_test.rs +++ b/crates/spk-build/src/build/sources_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use spk_schema::foundation::fixtures::*; use spk_schema::ident::build_ident; diff --git a/crates/spk-build/src/lib.rs b/crates/spk-build/src/lib.rs index 9b2dd75f39..50b49eb219 100644 --- a/crates/spk-build/src/lib.rs +++ b/crates/spk-build/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod build; mod error; diff --git a/crates/spk-cli/cmd-build/src/lib.rs b/crates/spk-cli/cmd-build/src/lib.rs index 24106f79f1..74daba1528 100644 --- a/crates/spk-cli/cmd-build/src/lib.rs +++ b/crates/spk-cli/cmd-build/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_build; diff --git a/crates/spk-cli/cmd-convert/src/lib.rs b/crates/spk-cli/cmd-convert/src/lib.rs index a6a2b5b426..6d5a31fc21 100644 --- a/crates/spk-cli/cmd-convert/src/lib.rs +++ b/crates/spk-cli/cmd-convert/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_convert; diff --git a/crates/spk-cli/cmd-env/src/cmd_env.rs b/crates/spk-cli/cmd-env/src/cmd_env.rs index 63703f2b68..c67e689551 100644 --- a/crates/spk-cli/cmd-env/src/cmd_env.rs +++ b/crates/spk-cli/cmd-env/src/cmd_env.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::ffi::OsString; use anyhow::{Context, Result}; diff --git a/crates/spk-cli/cmd-env/src/lib.rs b/crates/spk-cli/cmd-env/src/lib.rs index 0997f4aaae..9e64c850a4 100644 --- a/crates/spk-cli/cmd-env/src/lib.rs +++ b/crates/spk-cli/cmd-env/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_env; diff --git a/crates/spk-cli/cmd-explain/src/lib.rs b/crates/spk-cli/cmd-explain/src/lib.rs index 9426fe4767..4a7cf89d95 100644 --- a/crates/spk-cli/cmd-explain/src/lib.rs +++ b/crates/spk-cli/cmd-explain/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_explain; diff --git a/crates/spk-cli/cmd-install/src/lib.rs b/crates/spk-cli/cmd-install/src/lib.rs index 2bd6043b3d..62ad613b2e 100644 --- a/crates/spk-cli/cmd-install/src/lib.rs +++ b/crates/spk-cli/cmd-install/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_install; diff --git a/crates/spk-cli/cmd-make-binary/src/lib.rs b/crates/spk-cli/cmd-make-binary/src/lib.rs index 52966a7863..805cbdba98 100644 --- a/crates/spk-cli/cmd-make-binary/src/lib.rs +++ b/crates/spk-cli/cmd-make-binary/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_make_binary; diff --git a/crates/spk-cli/cmd-make-source/src/lib.rs b/crates/spk-cli/cmd-make-source/src/lib.rs index e4fe48ad5a..defd6d652c 100644 --- a/crates/spk-cli/cmd-make-source/src/lib.rs +++ b/crates/spk-cli/cmd-make-source/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_make_source; diff --git a/crates/spk-cli/cmd-render/src/cmd_render.rs b/crates/spk-cli/cmd-render/src/cmd_render.rs index 8bba1eef33..c0f6fee7e6 100644 --- a/crates/spk-cli/cmd-render/src/cmd_render.rs +++ b/crates/spk-cli/cmd-render/src/cmd_render.rs @@ -1,6 +1,10 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + use std::path::PathBuf; use anyhow::{bail, Context, Result}; diff --git a/crates/spk-cli/cmd-render/src/lib.rs b/crates/spk-cli/cmd-render/src/lib.rs index 1848f62bfb..23a6d536cd 100644 --- a/crates/spk-cli/cmd-render/src/lib.rs +++ b/crates/spk-cli/cmd-render/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_render; diff --git a/crates/spk-cli/cmd-repo/src/lib.rs b/crates/spk-cli/cmd-repo/src/lib.rs index e96e6660ac..cecccef4c8 100644 --- a/crates/spk-cli/cmd-repo/src/lib.rs +++ b/crates/spk-cli/cmd-repo/src/lib.rs @@ -3,5 +3,6 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_repo; diff --git a/crates/spk-cli/cmd-test/src/cmd_test.rs b/crates/spk-cli/cmd-test/src/cmd_test.rs index cb1ebbb418..2e97f38b9e 100644 --- a/crates/spk-cli/cmd-test/src/cmd_test.rs +++ b/crates/spk-cli/cmd-test/src/cmd_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::str::FromStr; use std::sync::Arc; diff --git a/crates/spk-cli/cmd-test/src/lib.rs b/crates/spk-cli/cmd-test/src/lib.rs index 194ec0dd5d..1c97e3b5ef 100644 --- a/crates/spk-cli/cmd-test/src/lib.rs +++ b/crates/spk-cli/cmd-test/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_test; diff --git a/crates/spk-cli/common/src/cli.rs b/crates/spk-cli/common/src/cli.rs index 013d168ab4..101adad4d8 100644 --- a/crates/spk-cli/common/src/cli.rs +++ b/crates/spk-cli/common/src/cli.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + //! Main entry points and utilities for command line interface and interaction. use anyhow::Result; diff --git a/crates/spk-cli/common/src/lib.rs b/crates/spk-cli/common/src/lib.rs index 2cbf4173b3..ba920504a9 100644 --- a/crates/spk-cli/common/src/lib.rs +++ b/crates/spk-cli/common/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] mod cli; mod env; diff --git a/crates/spk-cli/group1/src/cmd_deprecate.rs b/crates/spk-cli/group1/src/cmd_deprecate.rs index 13664cae1d..6ffbac0e07 100644 --- a/crates/spk-cli/group1/src/cmd_deprecate.rs +++ b/crates/spk-cli/group1/src/cmd_deprecate.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::io::Write; use std::sync::Arc; diff --git a/crates/spk-cli/group1/src/lib.rs b/crates/spk-cli/group1/src/lib.rs index ddd2aba071..5d09f3c4e7 100644 --- a/crates/spk-cli/group1/src/lib.rs +++ b/crates/spk-cli/group1/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_bake; pub mod cmd_deprecate; diff --git a/crates/spk-cli/group2/src/cmd_new.rs b/crates/spk-cli/group2/src/cmd_new.rs index 9e1a9ddfca..50c300334b 100644 --- a/crates/spk-cli/group2/src/cmd_new.rs +++ b/crates/spk-cli/group2/src/cmd_new.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use anyhow::Result; use clap::Args; use colored::Colorize; diff --git a/crates/spk-cli/group2/src/cmd_publish.rs b/crates/spk-cli/group2/src/cmd_publish.rs index 6a45f05107..737ae2e73d 100644 --- a/crates/spk-cli/group2/src/cmd_publish.rs +++ b/crates/spk-cli/group2/src/cmd_publish.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::sync::Arc; use anyhow::Result; diff --git a/crates/spk-cli/group2/src/cmd_remove.rs b/crates/spk-cli/group2/src/cmd_remove.rs index fbba78a2ca..bdd4913a95 100644 --- a/crates/spk-cli/group2/src/cmd_remove.rs +++ b/crates/spk-cli/group2/src/cmd_remove.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::io::Write; use anyhow::Result; diff --git a/crates/spk-cli/group2/src/lib.rs b/crates/spk-cli/group2/src/lib.rs index a27f4e509f..a13095403b 100644 --- a/crates/spk-cli/group2/src/lib.rs +++ b/crates/spk-cli/group2/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_ls; pub mod cmd_new; diff --git a/crates/spk-cli/group3/src/lib.rs b/crates/spk-cli/group3/src/lib.rs index 39d4b29b2d..8c942dd97d 100644 --- a/crates/spk-cli/group3/src/lib.rs +++ b/crates/spk-cli/group3/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_export; pub mod cmd_import; diff --git a/crates/spk-cli/group4/src/lib.rs b/crates/spk-cli/group4/src/lib.rs index 41870829a7..124f5ad342 100644 --- a/crates/spk-cli/group4/src/lib.rs +++ b/crates/spk-cli/group4/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod cmd_lint; pub mod cmd_search; diff --git a/crates/spk-exec/src/lib.rs b/crates/spk-exec/src/lib.rs index 837fd06157..b65ff87ecd 100644 --- a/crates/spk-exec/src/lib.rs +++ b/crates/spk-exec/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; mod exec; diff --git a/crates/spk-schema/crates/foundation/src/ident_build/build.rs b/crates/spk-schema/crates/foundation/src/ident_build/build.rs index 113f4f40a6..8018780972 100644 --- a/crates/spk-schema/crates/foundation/src/ident_build/build.rs +++ b/crates/spk-schema/crates/foundation/src/ident_build/build.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::BTreeSet; use std::str::FromStr; diff --git a/crates/spk-schema/crates/foundation/src/ident_component/component_spec.rs b/crates/spk-schema/crates/foundation/src/ident_component/component_spec.rs index 60b3abb484..e2e093335a 100644 --- a/crates/spk-schema/crates/foundation/src/ident_component/component_spec.rs +++ b/crates/spk-schema/crates/foundation/src/ident_component/component_spec.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{BTreeSet, HashSet}; use std::convert::TryFrom; use std::fmt::{Display, Write}; diff --git a/crates/spk-schema/crates/foundation/src/ident_component/component_spec_test.rs b/crates/spk-schema/crates/foundation/src/ident_component/component_spec_test.rs index b6e81b5808..6d32e13f3e 100644 --- a/crates/spk-schema/crates/foundation/src/ident_component/component_spec_test.rs +++ b/crates/spk-schema/crates/foundation/src/ident_component/component_spec_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::Component; diff --git a/crates/spk-schema/crates/foundation/src/lib.rs b/crates/spk-schema/crates/foundation/src/lib.rs index e42ddabb45..54944c91cf 100644 --- a/crates/spk-schema/crates/foundation/src/lib.rs +++ b/crates/spk-schema/crates/foundation/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub mod env; pub mod fixtures; diff --git a/crates/spk-schema/crates/foundation/src/option_map/mod.rs b/crates/spk-schema/crates/foundation/src/option_map/mod.rs index ff1664bde1..d24f1cba7f 100644 --- a/crates/spk-schema/crates/foundation/src/option_map/mod.rs +++ b/crates/spk-schema/crates/foundation/src/option_map/mod.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{BTreeMap, HashMap}; use std::convert::{TryFrom, TryInto}; use std::iter::FromIterator; diff --git a/crates/spk-schema/crates/foundation/src/spec_ops/file_matcher_test.rs b/crates/spk-schema/crates/foundation/src/spec_ops/file_matcher_test.rs index 8e84d976c4..59553e664f 100644 --- a/crates/spk-schema/crates/foundation/src/spec_ops/file_matcher_test.rs +++ b/crates/spk-schema/crates/foundation/src/spec_ops/file_matcher_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::FileMatcher; diff --git a/crates/spk-schema/crates/foundation/src/version/compat.rs b/crates/spk-schema/crates/foundation/src/version/compat.rs index ea3e196bb6..807bc20add 100644 --- a/crates/spk-schema/crates/foundation/src/version/compat.rs +++ b/crates/spk-schema/crates/foundation/src/version/compat.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::cmp::{Ord, Ordering}; use std::collections::BTreeSet; use std::convert::TryFrom; diff --git a/crates/spk-schema/crates/foundation/src/version/version_test.rs b/crates/spk-schema/crates/foundation/src/version/version_test.rs index 475141d542..314c34b732 100644 --- a/crates/spk-schema/crates/foundation/src/version/version_test.rs +++ b/crates/spk-schema/crates/foundation/src/version/version_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::cmp::{Ord, Ordering}; use rstest::rstest; diff --git a/crates/spk-schema/crates/ident/src/ident_any_test.rs b/crates/spk-schema/crates/ident/src/ident_any_test.rs index b8c8a21d4a..0b7295c108 100644 --- a/crates/spk-schema/crates/ident/src/ident_any_test.rs +++ b/crates/spk-schema/crates/ident/src/ident_any_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::str::FromStr; use rstest::rstest; diff --git a/crates/spk-schema/crates/ident/src/lib.rs b/crates/spk-schema/crates/ident/src/lib.rs index 56db543506..47ffddfa1f 100644 --- a/crates/spk-schema/crates/ident/src/lib.rs +++ b/crates/spk-schema/crates/ident/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; mod format; mod ident; diff --git a/crates/spk-schema/crates/ident/src/range_ident_test.rs b/crates/spk-schema/crates/ident/src/range_ident_test.rs index a2e951901a..c9572f99cb 100644 --- a/crates/spk-schema/crates/ident/src/range_ident_test.rs +++ b/crates/spk-schema/crates/ident/src/range_ident_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::BTreeSet; use rstest::rstest; diff --git a/crates/spk-schema/crates/ident/src/request.rs b/crates/spk-schema/crates/ident/src/request.rs index b3ea9e0b6c..498b4f2d95 100644 --- a/crates/spk-schema/crates/ident/src/request.rs +++ b/crates/spk-schema/crates/ident/src/request.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::cmp::min; use std::collections::BTreeMap; use std::fmt::Write; diff --git a/crates/spk-schema/crates/validators/src/lib.rs b/crates/spk-schema/crates/validators/src/lib.rs index e8b71d8f41..2a4c782e7b 100644 --- a/crates/spk-schema/crates/validators/src/lib.rs +++ b/crates/spk-schema/crates/validators/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; mod validators; diff --git a/crates/spk-schema/src/build_spec.rs b/crates/spk-schema/src/build_spec.rs index e63c149fff..109544c9fb 100644 --- a/crates/spk-schema/src/build_spec.rs +++ b/crates/spk-schema/src/build_spec.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::HashSet; use itertools::Itertools; diff --git a/crates/spk-schema/src/build_spec_test.rs b/crates/spk-schema/src/build_spec_test.rs index 7f1e3850be..fb2d0ea2cb 100644 --- a/crates/spk-schema/src/build_spec_test.rs +++ b/crates/spk-schema/src/build_spec_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use spk_schema_foundation::FromYaml; diff --git a/crates/spk-schema/src/component_spec.rs b/crates/spk-schema/src/component_spec.rs index 35d2da1b42..8cc791bf5b 100644 --- a/crates/spk-schema/src/component_spec.rs +++ b/crates/spk-schema/src/component_spec.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::convert::TryInto; use serde::{Deserialize, Serialize}; diff --git a/crates/spk-schema/src/component_spec_list.rs b/crates/spk-schema/src/component_spec_list.rs index eff1b513f2..529ffb0ae0 100644 --- a/crates/spk-schema/src/component_spec_list.rs +++ b/crates/spk-schema/src/component_spec_list.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{BTreeSet, HashMap, HashSet}; use serde::{Deserialize, Serialize}; diff --git a/crates/spk-schema/src/component_spec_list_test.rs b/crates/spk-schema/src/component_spec_list_test.rs index 2ee029c11c..ed61b6bd41 100644 --- a/crates/spk-schema/src/component_spec_list_test.rs +++ b/crates/spk-schema/src/component_spec_list_test.rs @@ -1,5 +1,6 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 + // https://github.com/imageworks/spk use rstest::rstest; diff --git a/crates/spk-schema/src/component_spec_test.rs b/crates/spk-schema/src/component_spec_test.rs index 2acc7fd302..8586c01101 100644 --- a/crates/spk-schema/src/component_spec_test.rs +++ b/crates/spk-schema/src/component_spec_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::ComponentSpec; diff --git a/crates/spk-schema/src/embedded_packages_list.rs b/crates/spk-schema/src/embedded_packages_list.rs index e39432185a..d704bb283f 100644 --- a/crates/spk-schema/src/embedded_packages_list.rs +++ b/crates/spk-schema/src/embedded_packages_list.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use serde::{Deserialize, Serialize}; use spk_schema_foundation::ident_build::EmbeddedSource; use spk_schema_ident::AnyIdent; diff --git a/crates/spk-schema/src/embedded_packages_list_test.rs b/crates/spk-schema/src/embedded_packages_list_test.rs index 90d7404493..9b69307eff 100644 --- a/crates/spk-schema/src/embedded_packages_list_test.rs +++ b/crates/spk-schema/src/embedded_packages_list_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::EmbeddedPackagesList; diff --git a/crates/spk-schema/src/environ.rs b/crates/spk-schema/src/environ.rs index e349960685..a4cc8ee83f 100644 --- a/crates/spk-schema/src/environ.rs +++ b/crates/spk-schema/src/environ.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use serde::{Deserialize, Serialize}; use spk_schema_foundation::option_map::Stringified; diff --git a/crates/spk-schema/src/environ_test.rs b/crates/spk-schema/src/environ_test.rs index a20bf9eadd..9241f5c571 100644 --- a/crates/spk-schema/src/environ_test.rs +++ b/crates/spk-schema/src/environ_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::EnvOp; diff --git a/crates/spk-schema/src/error_test.rs b/crates/spk-schema/src/error_test.rs index 471a24415b..62c63a0676 100644 --- a/crates/spk-schema/src/error_test.rs +++ b/crates/spk-schema/src/error_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use crate::FromYaml; diff --git a/crates/spk-schema/src/install_spec.rs b/crates/spk-schema/src/install_spec.rs index 7687898c1f..e8feed4931 100644 --- a/crates/spk-schema/src/install_spec.rs +++ b/crates/spk-schema/src/install_spec.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use serde::{Deserialize, Serialize}; use spk_schema_ident::BuildIdent; diff --git a/crates/spk-schema/src/lib.rs b/crates/spk-schema/src/lib.rs index 200d98acfb..a7afab91d8 100644 --- a/crates/spk-schema/src/lib.rs +++ b/crates/spk-schema/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod build_spec; mod component_spec; mod component_spec_list; diff --git a/crates/spk-schema/src/option.rs b/crates/spk-schema/src/option.rs index 5821eee126..0cd7dd0a54 100644 --- a/crates/spk-schema/src/option.rs +++ b/crates/spk-schema/src/option.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::convert::TryFrom; use std::str::FromStr; diff --git a/crates/spk-schema/src/option_test.rs b/crates/spk-schema/src/option_test.rs index 7dc7ff5c3d..5ac44b37c8 100644 --- a/crates/spk-schema/src/option_test.rs +++ b/crates/spk-schema/src/option_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::Opt; diff --git a/crates/spk-schema/src/requirements_list_test.rs b/crates/spk-schema/src/requirements_list_test.rs index f12a47233c..d778c0f626 100644 --- a/crates/spk-schema/src/requirements_list_test.rs +++ b/crates/spk-schema/src/requirements_list_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::RequirementsList; diff --git a/crates/spk-schema/src/source_spec.rs b/crates/spk-schema/src/source_spec.rs index 7abd9f34e3..ee1824ef93 100644 --- a/crates/spk-schema/src/source_spec.rs +++ b/crates/spk-schema/src/source_spec.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::HashMap; use std::io::Write; use std::path::{Path, PathBuf}; diff --git a/crates/spk-schema/src/source_spec_test.rs b/crates/spk-schema/src/source_spec_test.rs index 49bb86f22e..dccdd69e3f 100644 --- a/crates/spk-schema/src/source_spec_test.rs +++ b/crates/spk-schema/src/source_spec_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use rstest::rstest; use super::{GitSource, LocalSource, ScriptSource, TarSource}; diff --git a/crates/spk-schema/src/spec_test.rs b/crates/spk-schema/src/spec_test.rs index 5f19313c92..401f9863d5 100644 --- a/crates/spk-schema/src/spec_test.rs +++ b/crates/spk-schema/src/spec_test.rs @@ -1,3 +1,6 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + + + diff --git a/crates/spk-schema/src/v0/spec.rs b/crates/spk-schema/src/v0/spec.rs index 452e3f0dac..0531770fd4 100644 --- a/crates/spk-schema/src/v0/spec.rs +++ b/crates/spk-schema/src/v0/spec.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{BTreeSet, HashMap}; use std::convert::TryInto; use std::path::Path; diff --git a/crates/spk-schema/src/version_range_test.rs b/crates/spk-schema/src/version_range_test.rs index 6979569f1e..aaa515e199 100644 --- a/crates/spk-schema/src/version_range_test.rs +++ b/crates/spk-schema/src/version_range_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use proptest::collection::{btree_map, vec}; use proptest::option::weighted; use proptest::prelude::*; diff --git a/crates/spk-solve/crates/graph/src/graph_test.rs b/crates/spk-solve/crates/graph/src/graph_test.rs index c426ccfc1d..f31d478f87 100644 --- a/crates/spk-solve/crates/graph/src/graph_test.rs +++ b/crates/spk-solve/crates/graph/src/graph_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::sync::Arc; use rstest::rstest; diff --git a/crates/spk-solve/crates/graph/src/lib.rs b/crates/spk-solve/crates/graph/src/lib.rs index 0b59fb6f7f..09192b68e1 100644 --- a/crates/spk-solve/crates/graph/src/lib.rs +++ b/crates/spk-solve/crates/graph/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; mod graph; diff --git a/crates/spk-solve/crates/package-iterator/src/build_key_test.rs b/crates/spk-solve/crates/package-iterator/src/build_key_test.rs index c16eb73871..2be66d052d 100644 --- a/crates/spk-solve/crates/package-iterator/src/build_key_test.rs +++ b/crates/spk-solve/crates/package-iterator/src/build_key_test.rs @@ -34,6 +34,7 @@ fn make_tag_part(pieces: Vec<&str>) -> Option> { // For making test case results #[allow(clippy::too_many_arguments)] +#[allow(clippy::fn_params_excessive_bools)] fn make_expanded_version_range_part( version: &str, max_digits: Vec, diff --git a/crates/spk-solve/crates/package-iterator/src/lib.rs b/crates/spk-solve/crates/package-iterator/src/lib.rs index db877570cd..79d95f8d39 100644 --- a/crates/spk-solve/crates/package-iterator/src/lib.rs +++ b/crates/spk-solve/crates/package-iterator/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod build_key; mod error; mod package_iterator; diff --git a/crates/spk-solve/crates/solution/src/lib.rs b/crates/spk-solve/crates/solution/src/lib.rs index a94be42d9c..618a8e7fef 100644 --- a/crates/spk-solve/crates/solution/src/lib.rs +++ b/crates/spk-solve/crates/solution/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; mod solution; diff --git a/crates/spk-solve/crates/solution/src/solution.rs b/crates/spk-solve/crates/solution/src/solution.rs index a1e112d476..98d135db36 100644 --- a/crates/spk-solve/crates/solution/src/solution.rs +++ b/crates/spk-solve/crates/solution/src/solution.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{HashMap, HashSet}; use std::fmt::Write; use std::iter::FromIterator; diff --git a/crates/spk-solve/crates/validation/src/impossible_checks_test.rs b/crates/spk-solve/crates/validation/src/impossible_checks_test.rs index aa67609c72..6ca0facadd 100644 --- a/crates/spk-solve/crates/validation/src/impossible_checks_test.rs +++ b/crates/spk-solve/crates/validation/src/impossible_checks_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::HashMap; use std::sync::atomic::Ordering; use std::sync::Arc; diff --git a/crates/spk-solve/crates/validation/src/lib.rs b/crates/spk-solve/crates/validation/src/lib.rs index bc2c2d129c..19515cc4fd 100644 --- a/crates/spk-solve/crates/validation/src/lib.rs +++ b/crates/spk-solve/crates/validation/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; mod impossible_checks; mod validation; diff --git a/crates/spk-solve/crates/validation/src/validation_test.rs b/crates/spk-solve/crates/validation/src/validation_test.rs index df05729b16..f066a7acec 100644 --- a/crates/spk-solve/crates/validation/src/validation_test.rs +++ b/crates/spk-solve/crates/validation/src/validation_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::sync::Arc; use rstest::rstest; diff --git a/crates/spk-solve/src/lib.rs b/crates/spk-solve/src/lib.rs index 8aba7276ef..196ff6fdc0 100644 --- a/crates/spk-solve/src/lib.rs +++ b/crates/spk-solve/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; mod io; mod macros; diff --git a/crates/spk-solve/src/solver.rs b/crates/spk-solve/src/solver.rs index 57b5e5e885..c1bb88642f 100644 --- a/crates/spk-solve/src/solver.rs +++ b/crates/spk-solve/src/solver.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::borrow::Cow; use std::collections::{HashMap, HashSet}; use std::mem::take; diff --git a/crates/spk-solve/src/solver_test.rs b/crates/spk-solve/src/solver_test.rs index 1ed340fbe3..1f214bce15 100644 --- a/crates/spk-solve/src/solver_test.rs +++ b/crates/spk-solve/src/solver_test.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::sync::Arc; use rstest::{fixture, rstest}; diff --git a/crates/spk-storage/src/lib.rs b/crates/spk-storage/src/lib.rs index fe8856b475..c9999d3591 100644 --- a/crates/spk-storage/src/lib.rs +++ b/crates/spk-storage/src/lib.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + mod error; pub mod fixtures; mod storage; diff --git a/crates/spk-storage/src/storage/archive.rs b/crates/spk-storage/src/storage/archive.rs index a92416a124..30999a841a 100644 --- a/crates/spk-storage/src/storage/archive.rs +++ b/crates/spk-storage/src/storage/archive.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::convert::TryFrom; use std::path::Path; diff --git a/crates/spk-storage/src/storage/mem.rs b/crates/spk-storage/src/storage/mem.rs index d1bb8ad71f..760ac8bd33 100644 --- a/crates/spk-storage/src/storage/mem.rs +++ b/crates/spk-storage/src/storage/mem.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{HashMap, HashSet}; use std::convert::TryInto; use std::sync::Arc; diff --git a/crates/spk-storage/src/storage/repository.rs b/crates/spk-storage/src/storage/repository.rs index 6ca224a40e..e4d284bdbf 100644 --- a/crates/spk-storage/src/storage/repository.rs +++ b/crates/spk-storage/src/storage/repository.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{HashMap, HashSet}; use std::sync::Arc; diff --git a/crates/spk-storage/src/storage/runtime.rs b/crates/spk-storage/src/storage/runtime.rs index f8d77126ac..11573fc74b 100644 --- a/crates/spk-storage/src/storage/runtime.rs +++ b/crates/spk-storage/src/storage/runtime.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{HashMap, HashSet}; use std::convert::{TryFrom, TryInto}; use std::io::Read; diff --git a/crates/spk-storage/src/storage/spfs.rs b/crates/spk-storage/src/storage/spfs.rs index b7ff215b48..1c4e06e2c2 100644 --- a/crates/spk-storage/src/storage/spfs.rs +++ b/crates/spk-storage/src/storage/spfs.rs @@ -1,6 +1,7 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + use std::collections::{hash_map, HashMap, HashSet}; use std::convert::{TryFrom, TryInto}; use std::str::FromStr; diff --git a/crates/spk/src/cli.rs b/crates/spk/src/cli.rs index 69e61d4c9a..7b4076e8aa 100644 --- a/crates/spk/src/cli.rs +++ b/crates/spk/src/cli.rs @@ -1,6 +1,10 @@ // Copyright (c) Sony Pictures Imageworks, et al. // SPDX-License-Identifier: Apache-2.0 // https://github.com/imageworks/spk + +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] + //! Main entry points and utilities for command line interface and interaction. use anyhow::{Context, Result}; diff --git a/crates/spk/src/lib.rs b/crates/spk/src/lib.rs index 03fdcc431b..fb8548e97a 100644 --- a/crates/spk/src/lib.rs +++ b/crates/spk/src/lib.rs @@ -3,6 +3,7 @@ // https://github.com/imageworks/spk #![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::fn_params_excessive_bools)] pub use { spk_build as build,