From f00edcb620c228fc7f0b8a5c58393a8727fa11c6 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Tue, 15 Sep 2026 10:32:55 +0200 Subject: [PATCH 1/2] chore: add missing newlines to source header --- src/uu/df/src/df.rs | 1 + src/uu/head/src/take.rs | 1 + src/uu/wc/src/utf8/mod.rs | 1 + tests/by-util/test_chcon.rs | 1 + tests/by-util/test_chown.rs | 2 ++ tests/by-util/test_df.rs | 1 + tests/by-util/test_env.rs | 1 + tests/by-util/test_expand.rs | 3 ++- tests/by-util/test_ls.rs | 1 + tests/by-util/test_nice.rs | 1 + tests/by-util/test_nohup.rs | 1 + tests/by-util/test_rm.rs | 1 + tests/by-util/test_tac.rs | 1 + tests/by-util/test_uptime.rs | 1 + 14 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/uu/df/src/df.rs b/src/uu/df/src/df.rs index c0faf753776..9ba50d853a9 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore itotal iused iavail ipcent pcent tmpfs squashfs lofs sysfs + mod blocks; mod columns; mod filesystem; diff --git a/src/uu/head/src/take.rs b/src/uu/head/src/take.rs index b4ec0cd2374..bb0dedf9108 100644 --- a/src/uu/head/src/take.rs +++ b/src/uu/head/src/take.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. //! Take all but the last elements of an iterator. + use memchr::memchr_iter; use std::collections::VecDeque; use std::io::{ErrorKind, Read, Write}; diff --git a/src/uu/wc/src/utf8/mod.rs b/src/uu/wc/src/utf8/mod.rs index 954e6e5fb4b..281cc907bc0 100644 --- a/src/uu/wc/src/utf8/mod.rs +++ b/src/uu/wc/src/utf8/mod.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore Sapin + mod read; pub use read::{BufReadDecoder, BufReadDecoderError}; diff --git a/tests/by-util/test_chcon.rs b/tests/by-util/test_chcon.rs index d4ed22884ce..c409f010bfb 100644 --- a/tests/by-util/test_chcon.rs +++ b/tests/by-util/test_chcon.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore (jargon) xattributes + #![allow(clippy::missing_errors_doc, clippy::similar_names)] #![cfg(all(feature = "selinux", any(target_os = "linux", target_os = "android")))] diff --git a/tests/by-util/test_chown.rs b/tests/by-util/test_chown.rs index 6ae0a8e4e7e..7e386df5ce4 100644 --- a/tests/by-util/test_chown.rs +++ b/tests/by-util/test_chown.rs @@ -4,11 +4,13 @@ // file that was distributed with this source code. // spell-checker:ignore (words) agroupthatdoesntexist auserthatdoesntexist cuuser groupname notexisting passgrp + #[cfg(all(unix, not(target_os = "openbsd")))] use std::os::unix::fs::MetadataExt; use uutests::util::{CmdResult, TestScenario, is_ci, run_ucmd_as_root}; use uutests::util_name; use uutests::{at_and_ucmd, new_ucmd}; + // Apparently some CI environments have configuration issues, e.g. with 'whoami' and 'id'. // If we are running inside the CI and "needle" is in "stderr" skipping this test is // considered okay. If we are not inside the CI this calls assert!(result.success). diff --git a/tests/by-util/test_df.rs b/tests/by-util/test_df.rs index 19bbe947b05..f0459662d6a 100644 --- a/tests/by-util/test_df.rs +++ b/tests/by-util/test_df.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore udev pcent iuse itotal iused ipcent binfmt + #![allow( clippy::similar_names, clippy::cast_possible_truncation, diff --git a/tests/by-util/test_env.rs b/tests/by-util/test_env.rs index 6ab2efb9af2..1e9ea8505ea 100644 --- a/tests/by-util/test_env.rs +++ b/tests/by-util/test_env.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore (words) bamf chdir rlimit prlimit COMSPEC cout cerr FFFD winsize xpixel ypixel Secho sighandler putenv + #![allow(clippy::missing_errors_doc)] #[cfg(unix)] diff --git a/tests/by-util/test_expand.rs b/tests/by-util/test_expand.rs index f5626531c51..5e702ba0cfa 100644 --- a/tests/by-util/test_expand.rs +++ b/tests/by-util/test_expand.rs @@ -3,9 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) taaaa tbbbb tcccc + use uucore::display::Quotable; use uutests::new_ucmd; -// spell-checker:ignore (ToDO) taaaa tbbbb tcccc #[test] fn test_invalid_arg() { diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 5259130aa6b..de9afbc98e0 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -5,6 +5,7 @@ // spell-checker:ignore (words) READMECAREFULLY birthtime doesntexist oneline somebackup lrwx somefile somegroup somehiddenbackup somehiddenfile tabsize aaaaaaaa bbbb cccc dddddddd ncccc neee naaaaa nbcdef nfffff dired subdired tmpfs mdir COLORTERM mexe bcdef mfoo timefile // spell-checker:ignore (words) fakeroot setcap drwxr bcdlps mdangling mentry awith acolons NOFILE NOTCAPABLE + #![allow( clippy::similar_names, clippy::too_many_lines, diff --git a/tests/by-util/test_nice.rs b/tests/by-util/test_nice.rs index 504fc679154..1e1a69dca3c 100644 --- a/tests/by-util/test_nice.rs +++ b/tests/by-util/test_nice.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore getpriority setpriority + #[cfg(unix)] use uutests::new_ucmd; diff --git a/tests/by-util/test_nohup.rs b/tests/by-util/test_nohup.rs index cf6e57649b8..1500ad91c71 100644 --- a/tests/by-util/test_nohup.rs +++ b/tests/by-util/test_nohup.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore winsize Openpty openpty xpixel ypixel ptyprocess + #[cfg(unix)] use std::thread::sleep; use uutests::new_ucmd; diff --git a/tests/by-util/test_rm.rs b/tests/by-util/test_rm.rs index f972acd5630..4f97c8b8bc0 100644 --- a/tests/by-util/test_rm.rs +++ b/tests/by-util/test_rm.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore rootlink dotdot rootfile deleteme keepme topfile + #![allow(clippy::stable_sort_primitive)] use std::process::Stdio; diff --git a/tests/by-util/test_tac.rs b/tests/by-util/test_tac.rs index 5d2f939f5ce..a33ba10bd08 100644 --- a/tests/by-util/test_tac.rs +++ b/tests/by-util/test_tac.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore axxbxx bxxaxx axxx axxxx xxaxx xxax xxxxa axyz zyax zyxa bbaaa aaabc bcdddd cddddaaabc xyzabc abcxyzabc nbbaaa EISDIR SIGBUS mmap + #[cfg(unix)] use uutests::at_and_ucmd; use uutests::new_ucmd; diff --git a/tests/by-util/test_uptime.rs b/tests/by-util/test_uptime.rs index 77fd2fd5471..9940ca95679 100644 --- a/tests/by-util/test_uptime.rs +++ b/tests/by-util/test_uptime.rs @@ -5,6 +5,7 @@ // // spell-checker:ignore utmp runlevel testusr testx boottime + #![allow(clippy::cast_possible_wrap, clippy::unreadable_literal)] #[cfg(unix)] From 93d00f1b886edae16664b65dd95db6faae00fa81 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Tue, 15 Sep 2026 10:45:08 +0200 Subject: [PATCH 2/2] chore: remove empty comment lines from header --- src/uu/du/src/du.rs | 1 - src/uu/env/src/split_iterator.rs | 1 - src/uu/env/src/string_parser.rs | 2 +- src/uu/pr/src/pr.rs | 2 -- src/uucore/src/lib/features/systemd_logind.rs | 1 - src/uucore/src/lib/features/utmpx.rs | 1 - src/uucore_procs/src/lib.rs | 2 +- tests/by-util/test_base32.rs | 1 - tests/by-util/test_date.rs | 1 - tests/by-util/test_mv.rs | 1 - tests/by-util/test_nl.rs | 1 - tests/by-util/test_readlink.rs | 1 - tests/by-util/test_unexpand.rs | 1 - tests/by-util/test_uptime.rs | 1 - tests/test_localization_and_colors.rs | 2 -- 15 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index ed98f19d94a..e76d59d4084 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore fstatat openat dirfd use clap::{Arg, ArgAction, ArgMatches, Command, builder::PossibleValue}; diff --git a/src/uu/env/src/split_iterator.rs b/src/uu/env/src/split_iterator.rs index 54923fbc3ba..2cf3f8e20f3 100644 --- a/src/uu/env/src/split_iterator.rs +++ b/src/uu/env/src/split_iterator.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // This file is based on work from Tomasz Miąsko who published it as "shell_words" crate, // licensed under the Apache License, Version 2.0 // or the MIT license , at your option. diff --git a/src/uu/env/src/string_parser.rs b/src/uu/env/src/string_parser.rs index d9da4271a11..30b4870e2e8 100644 --- a/src/uu/env/src/string_parser.rs +++ b/src/uu/env/src/string_parser.rs @@ -3,8 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore (words) FFFD + #![forbid(unsafe_code)] use std::{borrow::Cow, ffi::OsStr}; diff --git a/src/uu/pr/src/pr.rs b/src/uu/pr/src/pr.rs index ae1f8348697..5bd5053c0d6 100644 --- a/src/uu/pr/src/pr.rs +++ b/src/uu/pr/src/pr.rs @@ -3,8 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// - // spell-checker:ignore (ToDO) adFfmprt, kmerge use clap::{Arg, ArgAction, ArgMatches, Command}; diff --git a/src/uucore/src/lib/features/systemd_logind.rs b/src/uucore/src/lib/features/systemd_logind.rs index 12f66c19d30..5d3a23e6d10 100644 --- a/src/uucore/src/lib/features/systemd_logind.rs +++ b/src/uucore/src/lib/features/systemd_logind.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore logind libsystemd btime unref RAII testuser GETPW sysconf //! Systemd-logind support for reading login records diff --git a/src/uucore/src/lib/features/utmpx.rs b/src/uucore/src/lib/features/utmpx.rs index 9c0e11ec025..4e1a502ed8d 100644 --- a/src/uucore/src/lib/features/utmpx.rs +++ b/src/uucore/src/lib/features/utmpx.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore IDLEN logind //! Aims to provide platform-independent methods to obtain login records diff --git a/src/uucore_procs/src/lib.rs b/src/uucore_procs/src/lib.rs index 449bc21d230..f65e40c5f28 100644 --- a/src/uucore_procs/src/lib.rs +++ b/src/uucore_procs/src/lib.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore SIGSEGV //! A collection of procedural macros for uutils. + #![deny(missing_docs)] use proc_macro::TokenStream; diff --git a/tests/by-util/test_base32.rs b/tests/by-util/test_base32.rs index 98df45fa2c4..1816cb2927b 100644 --- a/tests/by-util/test_base32.rs +++ b/tests/by-util/test_base32.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// #[cfg(unix)] use uutests::at_and_ucmd; use uutests::new_ucmd; diff --git a/tests/by-util/test_date.rs b/tests/by-util/test_date.rs index 67c3b8d5257..edb56c1746d 100644 --- a/tests/by-util/test_date.rs +++ b/tests/by-util/test_date.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker: ignore: AEDT AEST EEST NZDT NZST Kolkata Iseconds févr février janv janvier mercredi samedi sommes juin décembre Januar Juni Dezember enero junio diciembre gennaio giugno dicembre junho dezembro lundi dimanche Montag Sonntag Samstag sábado febr MEST MESZ KST uueuu ueuu vasárnap június január distros // spell-checker: ignore: uppercases diff --git a/tests/by-util/test_mv.rs b/tests/by-util/test_mv.rs index caa8f15b09c..2a33c8d9c2f 100644 --- a/tests/by-util/test_mv.rs +++ b/tests/by-util/test_mv.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore mydir hardlinked tmpfs notty unwriteable myfolder SRCDATA DSTDATA REALDATA // spell-checker:ignore dirattr dirvalue setfattr getfattr diff --git a/tests/by-util/test_nl.rs b/tests/by-util/test_nl.rs index 161472da70b..ad4fd2b1ff6 100644 --- a/tests/by-util/test_nl.rs +++ b/tests/by-util/test_nl.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore binvalid finvalid hinvalid iinvalid linvalid nabcabc nabcabcabc ninvalid vinvalid winvalid dabc näää févr use uutests::{at_and_ucmd, new_ucmd, util::TestScenario, util_name}; diff --git a/tests/by-util/test_readlink.rs b/tests/by-util/test_readlink.rs index ad3576ba259..26351a8791d 100644 --- a/tests/by-util/test_readlink.rs +++ b/tests/by-util/test_readlink.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore regfile parentdir use uutests::util::{TestScenario, get_root_path}; diff --git a/tests/by-util/test_unexpand.rs b/tests/by-util/test_unexpand.rs index 447c43b4d29..01042e9445a 100644 --- a/tests/by-util/test_unexpand.rs +++ b/tests/by-util/test_unexpand.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore contenta edgecase behaviour tcaf use uutests::{at_and_ucmd, new_ucmd}; diff --git a/tests/by-util/test_uptime.rs b/tests/by-util/test_uptime.rs index 9940ca95679..1f356ae4ced 100644 --- a/tests/by-util/test_uptime.rs +++ b/tests/by-util/test_uptime.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // spell-checker:ignore utmp runlevel testusr testx boottime #![allow(clippy::cast_possible_wrap, clippy::unreadable_literal)] diff --git a/tests/test_localization_and_colors.rs b/tests/test_localization_and_colors.rs index bec92c986d1..814d03e94ff 100644 --- a/tests/test_localization_and_colors.rs +++ b/tests/test_localization_and_colors.rs @@ -3,8 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// - use std::collections::HashSet; use std::env; use std::process::Command;