Skip to content

Commit 4096f42

Browse files
authored
Merge pull request #478 from imageworks/clippy-config
Custom clippy configuration
2 parents 83e13f0 + d542ae8 commit 4096f42

File tree

42 files changed

+90
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+90
-4
lines changed

.clippy.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# default is 3
2+
max-fn-params-bools = 1
3+
4+
# default is 7
5+
too-many-arguments-threshold = 5

crates/parsedbuf/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub use paste;
89

crates/spfs-cli/cmd-clean/src/cmd_clean.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
use chrono::prelude::*;
69
use clap::Parser;
710
use colored::*;

crates/spfs-cli/cmd-enter/src/cmd_enter.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
use std::ffi::OsString;
69

710
use clap::Parser;

crates/spfs-cli/cmd-join/src/cmd_join.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
use std::ffi::OsString;
69

710
use clap::Parser;

crates/spfs-cli/cmd-monitor/src/cmd_monitor.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
use std::time::Duration;
69

710
use clap::Parser;

crates/spfs-cli/common/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![deny(unsafe_op_in_unsafe_fn)]
2+
#![warn(clippy::fn_params_excessive_bools)]
3+
14
//! Common macros and argument structures for the spfs command line
25
36
mod args;

crates/spfs-cli/main/src/bin.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
use clap::{Parser, Subcommand};
69
use spfs::Error;
710

crates/spfs-encoding/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
#![deny(missing_docs)]
1414
#![deny(unsafe_op_in_unsafe_fn)]
15+
#![warn(clippy::fn_params_excessive_bools)]
1516

1617
mod binary;
1718
mod error;

crates/spfs/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5-
//! Filesystem isolation, capture and distribution.
6-
75
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
8+
//! Filesystem isolation, capture and distribution.
89
910
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
1011

crates/spfs/src/resolve_test.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
use std::sync::Arc;
2-
31
// Copyright (c) Sony Pictures Imageworks, et al.
42
// SPDX-License-Identifier: Apache-2.0
53
// https://github.com/imageworks/spk
4+
5+
use std::sync::Arc;
6+
67
use rstest::rstest;
78

89
use super::resolve_stack_to_layers;

crates/spk-build/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod build;
69
mod error;
710

crates/spk-cli/cmd-build/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_build;

crates/spk-cli/cmd-convert/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_convert;

crates/spk-cli/cmd-env/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_env;

crates/spk-cli/cmd-explain/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_explain;

crates/spk-cli/cmd-install/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_install;

crates/spk-cli/cmd-make-binary/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_make_binary;

crates/spk-cli/cmd-make-source/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_make_source;

crates/spk-cli/cmd-render/src/cmd_render.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// Copyright (c) Sony Pictures Imageworks, et al.
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
4+
5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
48
use std::path::PathBuf;
59

610
use anyhow::{bail, Context, Result};

crates/spk-cli/cmd-render/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_render;

crates/spk-cli/cmd-repo/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_repo;

crates/spk-cli/cmd-test/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_test;
89

crates/spk-cli/common/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
mod cli;
89
mod env;

crates/spk-cli/group1/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_bake;
89
pub mod cmd_deprecate;

crates/spk-cli/group2/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_ls;
89
pub mod cmd_new;

crates/spk-cli/group3/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_export;
89
pub mod cmd_import;

crates/spk-cli/group4/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod cmd_lint;
89
pub mod cmd_search;

crates/spk-exec/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
mod exec;
710

crates/spk-schema/crates/foundation/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub mod env;
89
pub mod fixtures;

crates/spk-schema/crates/ident/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
mod format;
710
mod ident;

crates/spk-schema/crates/validators/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
mod validators;
710

crates/spk-schema/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod build_spec;
69
mod component_spec;
710
mod component_spec_list;

crates/spk-solve/crates/graph/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
mod graph;
710

crates/spk-solve/crates/package-iterator/src/build_key_test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ fn make_tag_part(pieces: Vec<&str>) -> Option<Vec<BuildKeyVersionNumberPiece>> {
3434

3535
// For making test case results
3636
#[allow(clippy::too_many_arguments)]
37+
#[allow(clippy::fn_params_excessive_bools)]
3738
fn make_expanded_version_range_part(
3839
version: &str,
3940
max_digits: Vec<u32>,

crates/spk-solve/crates/package-iterator/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod build_key;
69
mod error;
710
mod package_iterator;

crates/spk-solve/crates/solution/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
mod solution;
710

crates/spk-solve/crates/validation/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
mod impossible_checks;
710
mod validation;

crates/spk-solve/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
mod io;
710
mod macros;

crates/spk-storage/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
44

5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
58
mod error;
69
pub mod fixtures;
710
mod storage;

crates/spk/src/cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// Copyright (c) Sony Pictures Imageworks, et al.
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/imageworks/spk
4+
5+
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
7+
48
//! Main entry points and utilities for command line interface and interaction.
59
610
use anyhow::{Context, Result};

crates/spk/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://github.com/imageworks/spk
44

55
#![deny(unsafe_op_in_unsafe_fn)]
6+
#![warn(clippy::fn_params_excessive_bools)]
67

78
pub use {
89
spk_build as build,

0 commit comments

Comments
 (0)