Newly introduced findings

List of Findings

Error: CLIPPY_WARNING: [#def1]
crates/lib/src/bls_config.rs:38:5: warning: implementation of inherent method `to_string(&self) -> String` for type `bls_config::BLSConfig`
#     |
#  38 | /     pub(crate) fn to_string(&self) -> String {
#  39 | |         let mut out = String::new();
#  40 | |
#  41 | |         if let Some(title) = &self.title {
#  ...  |
#  54 | |         out
#  55 | |     }
#     | |_____^
#     |
#     = help: implement trait `Display` for type `bls_config::BLSConfig` instead
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
#     = note: `#[warn(clippy::inherent_to_string)]` on by default

Error: CLIPPY_WARNING: [#def2]
crates/lib/src/bls_config.rs:42:21: warning: variables can be used directly in the `format!` string
#     |
#  42 |             out += &format!("title {}\n", title);
#     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
#     = note: `#[warn(clippy::uninlined_format_args)]` on by default
#  help: change this to
#     |
#  42 -             out += &format!("title {}\n", title);
#  42 +             out += &format!("title {title}\n");
#     |

Error: CLIPPY_WARNING: [#def3]
crates/lib/src/bls_config.rs:51:21: warning: variables can be used directly in the `format!` string
#     |
#  51 |             out += &format!("{} {}\n", key, value);
#     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
#  help: change this to
#     |
#  51 -             out += &format!("{} {}\n", key, value);
#  51 +             out += &format!("{key} {value}\n");
#     |

Error: CLIPPY_WARNING: [#def4]
crates/lib/src/cli.rs:956:5: warning: unneeded `return` statement
#      |
#  956 |     return Ok(target);
#      |     ^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
#      = note: `#[warn(clippy::needless_return)]` on by default
#  help: remove `return`
#      |
#  956 -     return Ok(target);
#  956 +     Ok(target)
#      |

Error: CLIPPY_WARNING: [#def5]
crates/lib/src/deploy.rs:879:30: warning: useless use of `format!`
#      |
#  879 |             .with_context(|| format!("Reopening /sysroot/boot/loader as owned fd"))?,
#      |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Reopening /sysroot/boot/loader as owned fd".to_string()`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Error: CLIPPY_WARNING: [#def6]
crates/lib/src/install.rs:624:16: warning: inequality checks against false are unnecessary
#      |
#  624 |             if self.composefs_opts.insecure != false {
#      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `self.composefs_opts.insecure`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
#      = note: `#[warn(clippy::bool_comparison)]` on by default

Error: CLIPPY_WARNING: [#def7]
crates/lib/src/install.rs:1621:39: warning: useless conversion to the same type: `std::string::String`
#       |
#  1621 |             let mut cmdline_options = String::from(root_setup.kargs.join(" "));
#       |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `root_setup.kargs.join(" ")`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Error: CLIPPY_WARNING: [#def8]
crates/lib/src/install.rs:1637:13: warning: useless use of `vec!`
#       |
#  1637 | /             vec![
#  1638 | |                 format!("root=UUID={DPS_UUID}"),
#  1639 | |                 RW_KARG.to_string(),
#  1640 | |                 format!("composefs={id_hex}"),
#  1641 | |             ]
#       | |_____________^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
#       = note: `#[warn(clippy::useless_vec)]` on by default
#  help: you can use an array directly
#       |
#  1637 ~             [format!("root=UUID={DPS_UUID}"),
#  1638 +                 RW_KARG.to_string(),
#  1639 +                 format!("composefs={id_hex}")]
#       |

Error: CLIPPY_WARNING: [#def9]
crates/lib/src/install.rs:1709:51: warning: variables can be used directly in the `format!` string
#       |
#  1709 |     create_dir_all(&entries_path).with_context(|| format!("Creating {:?}", entries_path))?;
#       |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
#  help: change this to
#       |
#  1709 -     create_dir_all(&entries_path).with_context(|| format!("Creating {:?}", entries_path))?;
#  1709 +     create_dir_all(&entries_path).with_context(|| format!("Creating {entries_path:?}"))?;
#       |

Error: CLIPPY_WARNING: [#def10]
crates/lib/src/install.rs:1759:5: warning: unneeded `return` statement
#       |
#  1759 |     return s;
#       |     ^^^^^^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
#  help: remove `return`
#       |
#  1759 -     return s;
#  1759 +     s
#       |

Error: CLIPPY_WARNING: [#def11]
crates/lib/src/install.rs:1788:20: warning: length comparison to zero
#       |
#  1788 |                 if v.len() > 0 {
#       |                    ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
#       = note: `#[warn(clippy::len_zero)]` on by default

Error: CLIPPY_WARNING: [#def12]
crates/lib/src/install.rs:2095:42: warning: useless use of `format!`
#       |
#  2095 |     let actual_var_path = root_path.join(format!("state/os/fedora/var"));
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"state/os/fedora/var".to_string()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Error: CLIPPY_WARNING: [#def13]
crates/lib/src/install.rs:2199:42: warning: variables can be used directly in the `format!` string
#       |
#  2199 |                 sysroot_dir.atomic_write(format!("etc/{}", DESTRUCTIVE_CLEANUP), b"")?;
#       |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
#  help: change this to
#       |
#  2199 -                 sysroot_dir.atomic_write(format!("etc/{}", DESTRUCTIVE_CLEANUP), b"")?;
#  2199 +                 sysroot_dir.atomic_write(format!("etc/{DESTRUCTIVE_CLEANUP}"), b"")?;
#       |

Error: CLIPPY_WARNING: [#def14]
crates/lib/src/parsers/grub_menuconfig.rs:24:13: warning: variables can be used directly in the `format!` string
#     |
#  24 |             writeln!(f, "insmod {}", insmod)?;
#     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
#  help: change this to
#     |
#  24 -             writeln!(f, "insmod {}", insmod)?;
#  24 +             writeln!(f, "insmod {insmod}")?;
#     |

Error: CLIPPY_WARNING: [#def15]
crates/lib/src/parsers/grub_menuconfig.rs:59:9: warning: unneeded `return` statement
#     |
#  59 |         return entry;
#     |         ^^^^^^^^^^^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
#  help: remove `return`
#     |
#  59 -         return entry;
#  59 +         entry
#     |

Error: CLIPPY_WARNING: [#def16]
crates/lib/src/parsers/grub_menuconfig.rs:90:22: warning: redundant guard
#     |
#  90 |                 c if c == '\\' => {
#     |                      ^^^^^^^^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
#     = note: `#[warn(clippy::redundant_guards)]` on by default
#  help: try
#     |
#  90 -                 c if c == '\\' => {
#  90 +                 '\\' => {
#     |

Error: CLIPPY_WARNING: [#def17]
crates/lib/src/parsers/grub_menuconfig.rs:186:5: warning: unneeded `return` statement
#      |
#  186 | /     return match result {
#  187 | |         Ok((_, entries)) => Ok(entries),
#  188 | |         Result::Err(_) => anyhow::bail!("Failed to parse grub menuentry"),
#  189 | |     };
#      | |_____^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
#  help: remove `return`
#      |
#  186 ~     match result {
#  187 +         Ok((_, entries)) => Ok(entries),
#  188 +         Result::Err(_) => anyhow::bail!("Failed to parse grub menuentry"),
#  189 ~     }
#      |

Error: CLIPPY_WARNING: [#def18]
crates/lib/src/status.rs:315:19: warning: slow zero-filling initialization
#      |
#  315 |       let mut buf = Vec::with_capacity(manifest.config().size() as usize);
#      |  ___________________^
#  316 | |     buf.resize(manifest.config().size() as usize, 0);
#      | |____________________________________________________^ help: consider replacing this with: `vec![0; manifest.config().size() as usize]`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization
#      = note: `#[warn(clippy::slow_vector_initialization)]` on by default

Scan Properties

analyzer-version-clippy1.88.0
analyzer-version-cppcheck2.18.0
analyzer-version-gcc15.1.1
analyzer-version-gcc-analyzer15.1.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.88.0
diffbase-analyzer-version-cppcheck2.18.0
diffbase-analyzer-version-gcc15.1.1
diffbase-analyzer-version-gcc-analyzer15.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-221.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namebootc-202508041915.g735a0b0f61-1
diffbase-store-results-to/tmp/tmp1ocejq6j/bootc-202508041915.g735a0b0f61-1.tar.xz
diffbase-time-created2025-08-04 20:22:08
diffbase-time-finished2025-08-04 20:30:05
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,cppcheck,clippy,gcc' '-o' '/tmp/tmp1ocejq6j/bootc-202508041915.g735a0b0f61-1.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp1ocejq6j/bootc-202508041915.g735a0b0f61-1.src.rpm'
diffbase-tool-versioncsmock-3.8.2-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-221.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namebootc-202508041957.g983cf6e18f-1
store-results-to/tmp/tmpn7iuarhs/bootc-202508041957.g983cf6e18f-1.tar.xz
time-created2025-08-04 20:30:28
time-finished2025-08-04 20:37:45
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,cppcheck,clippy,gcc' '-o' '/tmp/tmpn7iuarhs/bootc-202508041957.g983cf6e18f-1.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpn7iuarhs/bootc-202508041957.g983cf6e18f-1.src.rpm'
tool-versioncsmock-3.8.2-1.el9