Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

everywhere: cleanup unused/unnecessary spellcheck-disabling #6295

Merged
merged 14 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/uu/tail/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub enum ParseError {
InvalidEncoding,
}
/// Parses obsolete syntax
/// tail -\[NUM\]\[bcl\]\[f\] and tail +\[NUM\]\[bcl\]\[f\] // spell-checker:disable-line
/// tail -\[NUM\]\[bcl\]\[f\] and tail +\[NUM\]\[bcl\]\[f\]
pub fn parse_obsolete(src: &OsString) -> Option<Result<ObsoleteArgs, ParseError>> {
let mut rest = match src.to_str() {
Some(src) => src,
Expand Down
6 changes: 3 additions & 3 deletions src/uucore/src/lib/features/fsext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,22 +359,22 @@ use libc::c_int;
))]
extern "C" {
#[cfg(all(target_vendor = "apple", target_arch = "x86_64"))]
#[link_name = "getmntinfo$INODE64"] // spell-checker:disable-line
#[link_name = "getmntinfo$INODE64"]
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;

#[cfg(any(
target_os = "netbsd",
target_os = "openbsd",
all(target_vendor = "apple", target_arch = "aarch64")
))]
#[link_name = "getmntinfo"] // spell-checker:disable-line
#[link_name = "getmntinfo"]
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;

// Rust on FreeBSD uses 11.x ABI for filesystem metadata syscalls.
// Call the right version of the symbol for getmntinfo() result to
// match libc StatFS layout.
#[cfg(target_os = "freebsd")]
#[link_name = "getmntinfo@FBSD_1.0"] // spell-checker:disable-line
#[link_name = "getmntinfo@FBSD_1.0"]
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_basename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fn test_multiple_param() {
new_ucmd!()
.args(&[multiple_param, path, path])
.succeeds()
.stdout_only("baz\nbaz\n"); // spell-checker:disable-line
.stdout_only("baz\nbaz\n");
}
}

Expand All @@ -81,7 +81,7 @@ fn test_suffix_param() {
new_ucmd!()
.args(&[suffix_param, ".exe", path, path])
.succeeds()
.stdout_only("baz\nbaz\n"); // spell-checker:disable-line
.stdout_only("baz\nbaz\n");
}
}

Expand Down
8 changes: 4 additions & 4 deletions tests/by-util/test_basenc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ fn test_base64() {
.pipe_in("to>be?")
.succeeds()
.no_stderr()
.stdout_only("dG8+YmU/\n"); // spell-checker:disable-line
.stdout_only("dG8+YmU/\n");
}

#[test]
fn test_base64_decode() {
new_ucmd!()
.args(&["--base64", "-d"])
.pipe_in("dG8+YmU/") // spell-checker:disable-line
.pipe_in("dG8+YmU/")
.succeeds()
.no_stderr()
.stdout_only("to>be?");
Expand All @@ -61,14 +61,14 @@ fn test_base64url() {
.pipe_in("to>be?")
.succeeds()
.no_stderr()
.stdout_only("dG8-YmU_\n"); // spell-checker:disable-line
.stdout_only("dG8-YmU_\n");
}

#[test]
fn test_base64url_decode() {
new_ucmd!()
.args(&["--base64url", "-d"])
.pipe_in("dG8-YmU_") // spell-checker:disable-line
.pipe_in("dG8-YmU_")
.succeeds()
.no_stderr()
.stdout_only("to>be?");
Expand Down
6 changes: 2 additions & 4 deletions tests/by-util/test_cat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// spell-checker:ignore NOFILE
// spell-checker:ignore NOFILE nonewline

#[cfg(not(windows))]
use crate::common::util::vec_of_size;
Expand All @@ -23,7 +23,6 @@ fn test_output_simple() {

#[test]
fn test_no_options() {
// spell-checker:disable-next-line
for fixture in ["empty.txt", "alpha.txt", "nonewline.txt"] {
// Give fixture through command line file argument
new_ucmd!()
Expand Down Expand Up @@ -196,7 +195,6 @@ fn test_directory() {
fn test_directory_and_file() {
let s = TestScenario::new(util_name!());
s.fixtures.mkdir("test_directory2");
// spell-checker:disable-next-line
for fixture in ["empty.txt", "alpha.txt", "nonewline.txt"] {
s.ucmd()
.args(&["test_directory2", fixture])
Expand All @@ -219,7 +217,7 @@ fn test_three_directories_and_file_and_stdin() {
"alpha.txt",
"-",
"file_which_does_not_exist.txt",
"nonewline.txt", // spell-checker:disable-line
"nonewline.txt",
"test_directory3/test_directory5",
"test_directory3/../test_directory3/test_directory5",
"test_directory3",
Expand Down
10 changes: 4 additions & 6 deletions tests/by-util/test_kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ fn test_kill_list_one_signal_ignore_case() {
fn test_kill_list_unknown_must_match_input_case() {
new_ucmd!()
.arg("-l")
.arg("IaMnOtAsIgNaL") // spell-checker:disable-line
.arg("IaMnOtAsIgNaL")
.fails()
.stderr_contains("IaMnOtAsIgNaL"); // spell-checker:disable-line
.stderr_contains("IaMnOtAsIgNaL");
}

#[test]
Expand Down Expand Up @@ -169,7 +169,6 @@ fn test_kill_list_three_signal_first_unknown() {

#[test]
fn test_kill_set_bad_signal_name() {
// spell-checker:disable-line
new_ucmd!()
.arg("-s")
.arg("IAMNOTASIGNAL") // spell-checker:disable-line
Expand Down Expand Up @@ -274,16 +273,15 @@ fn test_kill_with_signal_name_new_form_unknown_must_match_input_case() {
let target = Target::new();
new_ucmd!()
.arg("-s")
.arg("IaMnOtAsIgNaL") // spell-checker:disable-line
.arg("IaMnOtAsIgNaL")
.arg(format!("{}", target.pid()))
.fails()
.stderr_contains("unknown signal")
.stderr_contains("IaMnOtAsIgNaL"); // spell-checker:disable-line
.stderr_contains("IaMnOtAsIgNaL");
}

#[test]
fn test_kill_no_pid_provided() {
// spell-checker:disable-line
new_ucmd!()
.fails()
.stderr_contains("no process ID specified");
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ fn test_ls_indicator_style() {
"--ind=slash",
"--classify",
"--classify=always",
"--classify=alway", // spell-checker:disable-line
"--classify=alway",
"--classify=al",
"--classify=yes",
"--classify=force",
Expand Down Expand Up @@ -4327,7 +4327,7 @@ fn test_ls_hyperlink() {
for argument in [
"--hyperlink=never",
"--hyperlink=neve", // spell-checker:disable-line
"--hyperlink=ne", // spell-checker:disable-line
"--hyperlink=ne",
"--hyperlink=n",
] {
scene
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_mktemp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ static TEST_TEMPLATE2: &str = "temp";
static TEST_TEMPLATE3: &str = "tempX";
static TEST_TEMPLATE4: &str = "tempXX";
static TEST_TEMPLATE5: &str = "tempXXX";
static TEST_TEMPLATE6: &str = "tempXXXlate"; // spell-checker:disable-line
static TEST_TEMPLATE7: &str = "XXXtemplate"; // spell-checker:disable-line
static TEST_TEMPLATE6: &str = "tempXXXlate";
static TEST_TEMPLATE7: &str = "XXXtemplate";
#[cfg(unix)]
static TEST_TEMPLATE8: &str = "tempXXXl/ate";
#[cfg(windows)]
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_numfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ fn test_delimiter_with_padding_and_fields() {
fn test_round() {
for (method, exp) in [
("from-zero", ["9.1K", "-9.1K", "9.1K", "-9.1K"]),
("from-zer", ["9.1K", "-9.1K", "9.1K", "-9.1K"]), // spell-checker:disable-line
("from-zer", ["9.1K", "-9.1K", "9.1K", "-9.1K"]),
("f", ["9.1K", "-9.1K", "9.1K", "-9.1K"]),
("towards-zero", ["9.0K", "-9.0K", "9.0K", "-9.0K"]),
("up", ["9.1K", "-9.0K", "9.1K", "-9.0K"]),
Expand Down
24 changes: 12 additions & 12 deletions tests/by-util/test_od.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn test_file() {
#[test]
fn test_2files() {
let (at, mut ucmd) = at_and_ucmd!();
at.write("test1", "abcdefghijklmnop"); // spell-checker:disable-line
at.write("test1", "abcdefghijklmnop");
at.write("test2", "qrstuvwxyz\n"); // spell-checker:disable-line
ucmd.arg("--endian=little")
.arg("test1")
Expand All @@ -74,13 +74,13 @@ fn test_2files() {
#[test]
fn test_no_file() {
let (_at, mut ucmd) = at_and_ucmd!();
ucmd.arg("}surely'none'would'thus'a'file'name").fails(); // spell-checker:disable-line
ucmd.arg("}surely'none'would'thus'a'file'name").fails();
}

// Test that od reads from stdin instead of a file
#[test]
fn test_from_stdin() {
let input = "abcdefghijklmnopqrstuvwxyz\n"; // spell-checker:disable-line
let input = "abcdefghijklmnopqrstuvwxyz\n";
new_ucmd!()
.arg("--endian=little")
.run_piped_stdin(input.as_bytes())
Expand Down Expand Up @@ -110,7 +110,7 @@ fn test_from_mixed() {

#[test]
fn test_multiple_formats() {
let input = "abcdefghijklmnopqrstuvwxyz\n"; // spell-checker:disable-line
let input = "abcdefghijklmnopqrstuvwxyz\n";
new_ucmd!()
.arg("-c")
.arg("-b")
Expand Down Expand Up @@ -581,7 +581,7 @@ fn test_invalid_offset() {

#[test]
fn test_skip_bytes() {
let input = "abcdefghijklmnopq"; // spell-checker:disable-line
let input = "abcdefghijklmnopq";
new_ucmd!()
.arg("-c")
.arg("--skip-bytes=5")
Expand All @@ -598,7 +598,7 @@ fn test_skip_bytes() {

#[test]
fn test_skip_bytes_hex() {
let input = "abcdefghijklmnopq"; // spell-checker:disable-line
let input = "abcdefghijklmnopq";
new_ucmd!()
.arg("-c")
.arg("--skip-bytes=0xB")
Expand Down Expand Up @@ -636,7 +636,7 @@ fn test_skip_bytes_error() {

#[test]
fn test_read_bytes() {
let input = "abcdefghijklmnopqrstuvwxyz\n12345678"; // spell-checker:disable-line
let input = "abcdefghijklmnopqrstuvwxyz\n12345678";
new_ucmd!()
.arg("--endian=little")
.arg("--read-bytes=27")
Expand Down Expand Up @@ -695,7 +695,7 @@ fn test_filename_parsing() {

#[test]
fn test_stdin_offset() {
let input = "abcdefghijklmnopq"; // spell-checker:disable-line
let input = "abcdefghijklmnopq";
new_ucmd!()
.arg("-c")
.arg("+5")
Expand Down Expand Up @@ -730,7 +730,7 @@ fn test_file_offset() {
#[test]
fn test_traditional() {
// note gnu od does not align both lines
let input = "abcdefghijklmnopq"; // spell-checker:disable-line
let input = "abcdefghijklmnopq";
new_ucmd!()
.arg("--traditional")
.arg("-a")
Expand All @@ -753,7 +753,7 @@ fn test_traditional() {
#[test]
fn test_traditional_with_skip_bytes_override() {
// --skip-bytes is ignored in this case
let input = "abcdefghijklmnop"; // spell-checker:disable-line
let input = "abcdefghijklmnop";
new_ucmd!()
.arg("--traditional")
.arg("--skip-bytes=10")
Expand All @@ -773,7 +773,7 @@ fn test_traditional_with_skip_bytes_override() {
#[test]
fn test_traditional_with_skip_bytes_non_override() {
// no offset specified in the traditional way, so --skip-bytes is used
let input = "abcdefghijklmnop"; // spell-checker:disable-line
let input = "abcdefghijklmnop";
new_ucmd!()
.arg("--traditional")
.arg("--skip-bytes=10")
Expand Down Expand Up @@ -803,7 +803,7 @@ fn test_traditional_error() {

#[test]
fn test_traditional_only_label() {
let input = "abcdefghijklmnopqrstuvwxyz"; // spell-checker:disable-line
let input = "abcdefghijklmnopqrstuvwxyz";
new_ucmd!()
.arg("-An")
.arg("--traditional")
Expand Down
7 changes: 2 additions & 5 deletions tests/by-util/test_printf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,7 @@ fn sub_any_specifiers_after_period() {

#[test]
fn unspecified_left_justify_is_1_width() {
new_ucmd!()
.args(&["%-o"]) //spell-checker:disable-line
.succeeds()
.stdout_only("0");
new_ucmd!().args(&["%-o"]).succeeds().stdout_only("0");
}

#[test]
Expand All @@ -538,7 +535,7 @@ fn sub_any_specifiers_after_second_param() {
#[test]
fn stop_after_additional_escape() {
new_ucmd!()
.args(&["A%sC\\cD%sF", "B", "E"]) //spell-checker:disable-line
.args(&["A%sC\\cD%sF", "B", "E"])
.succeeds()
.stdout_only("ABC");
}
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_realpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ fn test_relative() {
new_ucmd!()
.args(&["-sm", "--relative-base=/", "--relative-to=/", "/", "/usr"])
.succeeds()
.stdout_is(".\nusr\n"); // spell-checker:disable-line
.stdout_is(".\nusr\n");

let result = new_ucmd!()
.args(&["-sm", "--relative-base=/usr", "/tmp", "/usr"])
Expand All @@ -366,7 +366,7 @@ fn test_relative() {
new_ucmd!()
.args(&["-sm", "--relative-base=/", "/", "/usr"])
.succeeds()
.stdout_is(".\nusr\n"); // spell-checker:disable-line
.stdout_is(".\nusr\n");
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fn test_months_whitespace() {
"-M",
"--month-sort",
"--sort=month",
"--sort=mont", // spell-checker:disable-line
"--sort=mont",
"--sort=m",
],
);
Expand Down
Loading
Loading