From 20cb9f699a358e2d6e8e1895a8d985843fb81786 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Fri, 18 Sep 2026 10:15:14 +0100 Subject: [PATCH 1/2] chore: add missing newlines around spell-checker header --- fuzz/fuzz_targets/fuzz_env.rs | 1 + src/uu/chroot/src/chroot.rs | 1 + src/uu/csplit/src/csplit.rs | 1 + tests/by-util/test_b2sum.rs | 4 +++- tests/by-util/test_cp.rs | 1 + tests/by-util/test_factor.rs | 1 + tests/by-util/test_fmt.rs | 1 + tests/by-util/test_md5sum.rs | 4 +++- tests/by-util/test_paste.rs | 1 + tests/by-util/test_sha1sum.rs | 4 +++- tests/by-util/test_sha224sum.rs | 4 +++- tests/by-util/test_sha256sum.rs | 4 +++- tests/by-util/test_sha384sum.rs | 4 +++- tests/by-util/test_sha512sum.rs | 4 +++- tests/by-util/test_sleep.rs | 3 ++- tests/by-util/test_sort.rs | 1 + tests/by-util/test_tail.rs | 1 + tests/by-util/test_tee.rs | 4 ++-- tests/by-util/test_wc.rs | 3 ++- 19 files changed, 36 insertions(+), 11 deletions(-) diff --git a/fuzz/fuzz_targets/fuzz_env.rs b/fuzz/fuzz_targets/fuzz_env.rs index 62ab29c8c14..e7d81948dd4 100644 --- a/fuzz/fuzz_targets/fuzz_env.rs +++ b/fuzz/fuzz_targets/fuzz_env.rs @@ -2,6 +2,7 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. + // spell-checker:ignore chdir putenv #![no_main] diff --git a/src/uu/chroot/src/chroot.rs b/src/uu/chroot/src/chroot.rs index 4a092e218aa..dd7580b0906 100644 --- a/src/uu/chroot/src/chroot.rs +++ b/src/uu/chroot/src/chroot.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore (ToDO) NEWROOT Userspec chrooting chroots chdir pstatus repointed + mod error; use crate::error::ChrootError; diff --git a/src/uu/csplit/src/csplit.rs b/src/uu/csplit/src/csplit.rs index 45f052e81b6..ae285b4698b 100644 --- a/src/uu/csplit/src/csplit.rs +++ b/src/uu/csplit/src/csplit.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore rustdoc + #![allow(rustdoc::private_intra_doc_links)] use std::borrow::Borrow; diff --git a/tests/by-util/test_b2sum.rs b/tests/by-util/test_b2sum.rs index 08b13fabf90..216284c98e8 100644 --- a/tests/by-util/test_b2sum.rs +++ b/tests/by-util/test_b2sum.rs @@ -3,12 +3,14 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore checkfile, testf, ntestf + use rstest::rstest; use uutests::new_ucmd; use uutests::util::TestScenario; use uutests::util_name; -// spell-checker:ignore checkfile, testf, ntestf + macro_rules! get_hash( ($str:expr) => ( $str.split(' ').collect::>()[0] diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs index 40d50da0b64..862d11eb5bf 100644 --- a/tests/by-util/test_cp.rs +++ b/tests/by-util/test_cp.rs @@ -5,6 +5,7 @@ // spell-checker:ignore (flags) reflink (fs) tmpfs (linux) filefrag rlimit Rlim Nofile clob btrfs neve ROOTDIR USERDIR outfile subvolume uufs xattrs ELOOP // spell-checker:ignore bdfl hlsl IRWXO IRWXG nconfined matchpathcon libselinux-devel prwx doesnotexist reftests subdirs mksocket srwx dstlink mcstransd + #[cfg(unix)] use rstest::rstest; use uucore::display::Quotable; diff --git a/tests/by-util/test_factor.rs b/tests/by-util/test_factor.rs index 53de6bd9b38..10290f9f6ec 100644 --- a/tests/by-util/test_factor.rs +++ b/tests/by-util/test_factor.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore (methods) hexdigest funcs nprimes cmdline + #![allow( clippy::similar_names, clippy::cast_possible_truncation, diff --git a/tests/by-util/test_fmt.rs b/tests/by-util/test_fmt.rs index c19125b1a54..e0f47ae5cc4 100644 --- a/tests/by-util/test_fmt.rs +++ b/tests/by-util/test_fmt.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore plass samp FFFD + #[cfg(target_os = "linux")] use std::os::unix::ffi::OsStringExt; use uutests::new_ucmd; diff --git a/tests/by-util/test_md5sum.rs b/tests/by-util/test_md5sum.rs index 48016e5e52d..2efb66073f9 100644 --- a/tests/by-util/test_md5sum.rs +++ b/tests/by-util/test_md5sum.rs @@ -3,10 +3,12 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore checkfile, testf, ntestf + use uutests::new_ucmd; use uutests::util::TestScenario; use uutests::util_name; -// spell-checker:ignore checkfile, testf, ntestf + macro_rules! get_hash( ($str:expr) => ( $str.split(' ').collect::>()[0] diff --git a/tests/by-util/test_paste.rs b/tests/by-util/test_paste.rs index 4d9c8ca7e36..322274265fa 100644 --- a/tests/by-util/test_paste.rs +++ b/tests/by-util/test_paste.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore bsdutils toybox + #[cfg(target_os = "linux")] use std::os::unix::ffi::OsStringExt; use uutests::at_and_ucmd; diff --git a/tests/by-util/test_sha1sum.rs b/tests/by-util/test_sha1sum.rs index d1c5864238b..80096a8eff2 100644 --- a/tests/by-util/test_sha1sum.rs +++ b/tests/by-util/test_sha1sum.rs @@ -3,10 +3,12 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore checkfile, testf, ntestf + use uutests::new_ucmd; use uutests::util::TestScenario; use uutests::util_name; -// spell-checker:ignore checkfile, testf, ntestf + macro_rules! get_hash( ($str:expr) => ( $str.split(' ').collect::>()[0] diff --git a/tests/by-util/test_sha224sum.rs b/tests/by-util/test_sha224sum.rs index d6abc05962e..a7009a0c4eb 100644 --- a/tests/by-util/test_sha224sum.rs +++ b/tests/by-util/test_sha224sum.rs @@ -3,8 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -use uutests::new_ucmd; // spell-checker:ignore checkfile, testf, ntestf + +use uutests::new_ucmd; + macro_rules! get_hash( ($str:expr) => ( $str.split(' ').collect::>()[0] diff --git a/tests/by-util/test_sha256sum.rs b/tests/by-util/test_sha256sum.rs index 81698cfc26b..a1404a9ccd8 100644 --- a/tests/by-util/test_sha256sum.rs +++ b/tests/by-util/test_sha256sum.rs @@ -3,10 +3,12 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore checkfile, testf, ntestf, heic + use uutests::new_ucmd; use uutests::util::TestScenario; use uutests::util_name; -// spell-checker:ignore checkfile, testf, ntestf, heic + macro_rules! get_hash( ($str:expr) => ( $str.split(' ').collect::>()[0] diff --git a/tests/by-util/test_sha384sum.rs b/tests/by-util/test_sha384sum.rs index 7b51995e478..53edccbad65 100644 --- a/tests/by-util/test_sha384sum.rs +++ b/tests/by-util/test_sha384sum.rs @@ -3,8 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -use uutests::new_ucmd; // spell-checker:ignore checkfile, testf, ntestf + +use uutests::new_ucmd; + macro_rules! get_hash( ($str:expr) => ( $str.split(' ').collect::>()[0] diff --git a/tests/by-util/test_sha512sum.rs b/tests/by-util/test_sha512sum.rs index 61c876f3215..9836cf4df4f 100644 --- a/tests/by-util/test_sha512sum.rs +++ b/tests/by-util/test_sha512sum.rs @@ -3,8 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -use uutests::new_ucmd; // spell-checker:ignore checkfile, testf, ntestf + +use uutests::new_ucmd; + macro_rules! get_hash( ($str:expr) => ( $str.split(' ').collect::>()[0] diff --git a/tests/by-util/test_sleep.rs b/tests/by-util/test_sleep.rs index f1a0381050d..e44c114e433 100644 --- a/tests/by-util/test_sleep.rs +++ b/tests/by-util/test_sleep.rs @@ -3,10 +3,11 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore dont SIGBUS SIGSEGV sigsegv sigbus infd + use rstest::rstest; use uucore::display::Quotable; -// spell-checker:ignore dont SIGBUS SIGSEGV sigsegv sigbus infd use uutests::new_ucmd; #[cfg(unix)] diff --git a/tests/by-util/test_sort.rs b/tests/by-util/test_sort.rs index 0ac09775681..e3d9552dc42 100644 --- a/tests/by-util/test_sort.rs +++ b/tests/by-util/test_sort.rs @@ -4,6 +4,7 @@ // file that was distributed with this source code. // spell-checker:ignore (words) ints (linux) Nofile dfgi abmon avril + #![allow(clippy::cast_possible_wrap)] use std::env; diff --git a/tests/by-util/test_tail.rs b/tests/by-util/test_tail.rs index cadedc5c8ab..cf795ef5590 100644 --- a/tests/by-util/test_tail.rs +++ b/tests/by-util/test_tail.rs @@ -7,6 +7,7 @@ // spell-checker:ignore (libs) kqueue ELOOP EISDIR // spell-checker:ignore (jargon) tailable untailable datasame runneradmin tmpi // spell-checker:ignore (cmd) taskkill + #![allow( clippy::unicode_not_nfc, clippy::cast_lossless, diff --git a/tests/by-util/test_tee.rs b/tests/by-util/test_tee.rs index b4894c5ed82..f8bad5aa834 100644 --- a/tests/by-util/test_tee.rs +++ b/tests/by-util/test_tee.rs @@ -3,6 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore nopipe + #![allow(clippy::borrow_as_ptr)] use uutests::{at_and_ucmd, new_ucmd}; @@ -15,8 +17,6 @@ use std::time::Duration; // inspired by: // https://github.com/coreutils/coreutils/tests/misc/tee.sh -// spell-checker:ignore nopipe - #[test] #[cfg(unix)] fn test_error_stdin_directory() { diff --git a/tests/by-util/test_wc.rs b/tests/by-util/test_wc.rs index fc3bd861b3d..16fd79293f5 100644 --- a/tests/by-util/test_wc.rs +++ b/tests/by-util/test_wc.rs @@ -3,12 +3,13 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (flags) lwmcL clmwL ; (path) bogusfile emptyfile manyemptylines moby notrailingnewline onelongemptyline onelongword weirdchars ioerrdir + #[cfg(unix)] use uutests::at_and_ucmd; use uutests::new_ucmd; use uutests::util::vec_of_size; -// spell-checker:ignore (flags) lwmcL clmwL ; (path) bogusfile emptyfile manyemptylines moby notrailingnewline onelongemptyline onelongword weirdchars ioerrdir #[test] fn test_invalid_arg() { new_ucmd!().arg("--definitely-invalid").fails_with_code(1); From dce2bca47e1523d737785ca43720564e66966afe Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Fri, 18 Sep 2026 10:35:05 +0100 Subject: [PATCH 2/2] chore: move spell-checker header --- src/uu/env/src/split_iterator.rs | 3 ++- src/uu/rm/src/platform/unix.rs | 4 ++-- src/uu/sort/src/chunks.rs | 3 ++- src/uu/sort/src/sort.rs | 6 +++--- src/uu/tail/src/chunks.rs | 4 ++-- src/uucore/src/lib/features.rs | 4 ++-- src/uucore/src/lib/features/backup_control.rs | 4 ++-- src/uucore/src/lib/features/diagnostics.rs | 4 ++-- src/uucore/src/lib/features/fs.rs | 4 ++-- src/uucore/src/lib/features/fsext/mod.rs | 4 ++-- src/uucore/src/lib/features/fsxattr.rs | 1 + src/uucore/src/lib/features/mode.rs | 4 ++-- src/uucore/src/lib/features/parser/num_parser.rs | 4 ++-- src/uucore/src/lib/features/perms.rs | 4 ++-- src/uucore/src/lib/features/safe_traversal.rs | 11 +++++------ src/uucore/src/lib/lib.rs | 5 +++-- src/uucore/src/lib/macros.rs | 4 ++-- src/uucore/src/lib/mods/error.rs | 4 ++-- 18 files changed, 40 insertions(+), 37 deletions(-) diff --git a/src/uu/env/src/split_iterator.rs b/src/uu/env/src/split_iterator.rs index 2cf3f8e20f3..ec2b1d9d283 100644 --- a/src/uu/env/src/split_iterator.rs +++ b/src/uu/env/src/split_iterator.rs @@ -3,6 +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) Tomasz Miąsko rntfv FFFD varname + // 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. @@ -14,7 +16,6 @@ //! Apart from the grammar differences, there is a new feature integrated: $VARIABLE expansion. //! //! [GNU env] -// spell-checker:ignore (words) Tomasz Miąsko rntfv FFFD varname #![forbid(unsafe_code)] diff --git a/src/uu/rm/src/platform/unix.rs b/src/uu/rm/src/platform/unix.rs index eef2874b44a..04f63929578 100644 --- a/src/uu/rm/src/platform/unix.rs +++ b/src/uu/rm/src/platform/unix.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// Unix-specific implementations for the rm utility - // spell-checker:ignore fstatat unlinkat statx behaviour automount +// Unix-specific implementations for the rm utility + use indicatif::ProgressBar; use std::ffi::{OsStr, OsString}; use std::fs; diff --git a/src/uu/sort/src/chunks.rs b/src/uu/sort/src/chunks.rs index ca9efcd13e8..ee8261dd856 100644 --- a/src/uu/sort/src/chunks.rs +++ b/src/uu/sort/src/chunks.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 ELEMS + //! Utilities for reading files as chunks. -// spell-checker:ignore ELEMS #![allow(dead_code)] // Ignores non-used warning for `borrow_buffer` in `Chunk` diff --git a/src/uu/sort/src/sort.rs b/src/uu/sort/src/sort.rs index a6e88051893..5f86eea77bd 100644 --- a/src/uu/sort/src/sort.rs +++ b/src/uu/sort/src/sort.rs @@ -3,13 +3,13 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (misc) kKMGTPEZYRQ HFKJFK Mbdfhn getrlimit Nofile rlim bigdecimal extendedbigdecimal hexdigit behaviour keydef GETFD localeconv foldhash +// spell-checker:ignore (misc) uppercased qsort getmonth juin juil + // Although these links don't always seem to describe reality, check out the POSIX and GNU specs: // https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sort.html // https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html -// spell-checker:ignore (misc) kKMGTPEZYRQ HFKJFK Mbdfhn getrlimit Nofile rlim bigdecimal extendedbigdecimal hexdigit behaviour keydef GETFD localeconv foldhash -// spell-checker:ignore (misc) uppercased qsort getmonth juin juil - mod buffer_hint; mod check; mod chunks; diff --git a/src/uu/tail/src/chunks.rs b/src/uu/tail/src/chunks.rs index acf6b0a286a..1446df03440 100644 --- a/src/uu/tail/src/chunks.rs +++ b/src/uu/tail/src/chunks.rs @@ -3,13 +3,13 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) filehandle BUFSIZ + //! Iterating over a file by chunks, either starting at the end of the file with [`ReverseChunks`] //! or at the end of piped stdin with [`LinesChunk`] or [`BytesChunk`]. //! //! Use [`ReverseChunks::new`] to create a new iterator over chunks of bytes from the file. -// spell-checker:ignore (ToDO) filehandle BUFSIZ - use std::collections::VecDeque; use std::fs::File; use std::io::{BufRead, Read, Seek, SeekFrom, Write}; diff --git a/src/uucore/src/lib/features.rs b/src/uucore/src/lib/features.rs index e8b82567ad5..16d6c74b15e 100644 --- a/src/uucore/src/lib/features.rs +++ b/src/uucore/src/lib/features.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// features ~ feature-gated modules (core/bundler file) -// // spell-checker:ignore (features) extendedbigdecimal logind +// features ~ feature-gated modules (core/bundler file) + #[cfg(feature = "backup-control")] pub mod backup_control; #[cfg(feature = "benchmark")] diff --git a/src/uucore/src/lib/features/backup_control.rs b/src/uucore/src/lib/features/backup_control.rs index c508dd3598d..a47ff84f374 100644 --- a/src/uucore/src/lib/features/backup_control.rs +++ b/src/uucore/src/lib/features/backup_control.rs @@ -3,6 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore backupopt + //! Implement GNU-style backup functionality. //! //! This module implements the backup functionality as described in the [GNU @@ -80,8 +82,6 @@ //! } //! ``` -// spell-checker:ignore backupopt - use crate::{ display::Quotable, error::{UError, UResult}, diff --git a/src/uucore/src/lib/features/diagnostics.rs b/src/uucore/src/lib/features/diagnostics.rs index a891754c066..791854a00bf 100644 --- a/src/uucore/src/lib/features/diagnostics.rs +++ b/src/uucore/src/lib/features/diagnostics.rs @@ -3,6 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore étage replacen + //! Render an error against the argument list it came from. //! //! Utilities whose arguments *are* the expression they evaluate — `test`, `expr` @@ -34,8 +36,6 @@ //! ───╯ //! ``` -// spell-checker:ignore étage replacen - use std::borrow::Cow; use std::env; use std::ffi::{OsStr, OsString}; diff --git a/src/uucore/src/lib/features/fs.rs b/src/uucore/src/lib/features/fs.rs index 92430fa0438..eb7e18fdb55 100644 --- a/src/uucore/src/lib/features/fs.rs +++ b/src/uucore/src/lib/features/fs.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -//! Set of functions to manage regular files, special files, and links. - // spell-checker:ignore backport Ioctl absolutized linkat symlinkat renameat unlinkat openat urandom NOFOLLOW CLOEXEC RDONLY +//! Set of functions to manage regular files, special files, and links. + #[cfg(all(unix, not(target_os = "haiku")))] pub use libc::{major, makedev, minor}; use std::collections::HashSet; diff --git a/src/uucore/src/lib/features/fsext/mod.rs b/src/uucore/src/lib/features/fsext/mod.rs index 5286089ad66..77136cf62a3 100644 --- a/src/uucore/src/lib/features/fsext/mod.rs +++ b/src/uucore/src/lib/features/fsext/mod.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -//! Set of functions to manage file systems - // spell-checker:ignore DATETIME getmntinfo subsecond (fs) cifs smbfs +//! Set of functions to manage file systems + #[cfg(windows)] mod windows; diff --git a/src/uucore/src/lib/features/fsxattr.rs b/src/uucore/src/lib/features/fsxattr.rs index b3762ced37c..b180cf9a654 100644 --- a/src/uucore/src/lib/features/fsxattr.rs +++ b/src/uucore/src/lib/features/fsxattr.rs @@ -6,6 +6,7 @@ // spell-checker:ignore getxattr posix_acl_default posix_acl_access ENOTSUP EOPNOTSUPP renamer //! Set of functions to manage xattr on files and dirs + use itertools::Itertools; use rustc_hash::FxHashMap; use std::ffi::{OsStr, OsString}; diff --git a/src/uucore/src/lib/features/mode.rs b/src/uucore/src/lib/features/mode.rs index 8dfeccb4c94..77aef656d12 100644 --- a/src/uucore/src/lib/features/mode.rs +++ b/src/uucore/src/lib/features/mode.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -//! Set of functions to parse modes - // spell-checker:ignore (vars) fperm srwx +//! Set of functions to parse modes + use std::fmt::{self, Display}; use std::ops::Range; diff --git a/src/uucore/src/lib/features/parser/num_parser.rs b/src/uucore/src/lib/features/parser/num_parser.rs index 991b870ca03..2b5d34b0d4c 100644 --- a/src/uucore/src/lib/features/parser/num_parser.rs +++ b/src/uucore/src/lib/features/parser/num_parser.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -//! Utilities for parsing numbers in various formats - // spell-checker:ignore powf copysign prec ilog inity infinit infs bigdecimal extendedbigdecimal biguint underflowed muls +//! Utilities for parsing numbers in various formats + use bigdecimal::{ BigDecimal, num_bigint::{BigInt, BigUint, Sign}, diff --git a/src/uucore/src/lib/features/perms.rs b/src/uucore/src/lib/features/perms.rs index b0c4a6fd26e..89dc4b5bffc 100644 --- a/src/uucore/src/lib/features/perms.rs +++ b/src/uucore/src/lib/features/perms.rs @@ -3,10 +3,10 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -//! Common functions to manage permissions - // spell-checker:ignore (jargon) TOCTOU fchownat fchown +//! Common functions to manage permissions + use crate::display::Quotable; use crate::error::{UResult, USimpleError, strip_errno}; pub use crate::features::entries; diff --git a/src/uucore/src/lib/features/safe_traversal.rs b/src/uucore/src/lib/features/safe_traversal.rs index 4f573ad0359..39fcb0e8023 100644 --- a/src/uucore/src/lib/features/safe_traversal.rs +++ b/src/uucore/src/lib/features/safe_traversal.rs @@ -3,17 +3,16 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// -// Safe directory traversal using openat() and related syscalls -// This module provides TOCTOU-safe filesystem operations for recursive traversal -// -// Available on Unix -// // spell-checker:ignore CLOEXEC RDONLY TOCTOU closedir dirp fdopendir fstatat openat REMOVEDIR unlinkat smallfile // spell-checker:ignore RAII dirfd fchownat fchown FchmodatFlags fchmodat fchmod mkdirat CREAT WRONLY ELOOP ENOTDIR EXCL EEXIST // spell-checker:ignore atimensec mtimensec ctimensec opath chmods fakeroot fakechroot // spell-checker:ignore LARGEFILE +// Safe directory traversal using openat() and related syscalls +// This module provides TOCTOU-safe filesystem operations for recursive traversal +// +// Available on Unix + #[cfg(test)] use std::os::unix::ffi::OsStringExt; diff --git a/src/uucore/src/lib/lib.rs b/src/uucore/src/lib/lib.rs index 53781b7f92a..171afe80d1a 100644 --- a/src/uucore/src/lib/lib.rs +++ b/src/uucore/src/lib/lib.rs @@ -3,10 +3,11 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore sigaction SIGBUS SIGSEGV extendedbigdecimal myutil logind + //! library ~ (core/bundler file) + // #![deny(missing_docs)] //TODO: enable this -// -// spell-checker:ignore sigaction SIGBUS SIGSEGV extendedbigdecimal myutil logind // * feature-gated external crates (re-shared as public internal modules) #[cfg(feature = "libc")] diff --git a/src/uucore/src/lib/macros.rs b/src/uucore/src/lib/macros.rs index 857e843546b..9528549fe8b 100644 --- a/src/uucore/src/lib/macros.rs +++ b/src/uucore/src/lib/macros.rs @@ -3,6 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore sourcepath targetpath rustdoc + //! Macros for the uucore utilities. //! //! This module bundles all macros used across the uucore utilities. These @@ -31,8 +33,6 @@ //! - From custom messages: [`crate::show_error!`] //! - Print warnings: [`crate::show_warning!`] -// spell-checker:ignore sourcepath targetpath rustdoc - use std::sync::atomic::AtomicBool; // This file is part of the uutils coreutils package. diff --git a/src/uucore/src/lib/mods/error.rs b/src/uucore/src/lib/mods/error.rs index c894774078e..32cfa0e8a46 100644 --- a/src/uucore/src/lib/mods/error.rs +++ b/src/uucore/src/lib/mods/error.rs @@ -3,6 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore uioerror rustdoc + //! All utils return exit with an exit code. Usually, the following scheme is used: //! * `0`: succeeded //! * `1`: minor problems @@ -53,8 +55,6 @@ //! * Using [`ExitCode`] is not recommended but can be useful for converting utils to use //! [`UResult`]. -// spell-checker:ignore uioerror rustdoc - use std::{ cell::Cell, error::Error,