From f82de13847105ce735e84c3f91e5432a32d93e90 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 27 May 2020 01:13:08 -0500 Subject: [PATCH] docs ~ spell-check repairs and addition of exceptions --- Makefile.toml | 4 +-- build.rs | 3 +- src/bin/coreutils.rs | 5 --- src/uu/base32/src/base_common.rs | 4 +-- src/uu/base64/src/base_common.rs | 4 +-- src/uu/basename/src/basename.rs | 2 ++ src/uu/cat/Cargo.toml | 2 +- src/uu/cat/src/cat.rs | 8 +++-- src/uu/chgrp/src/chgrp.rs | 2 ++ src/uu/chmod/src/chmod.rs | 2 ++ src/uu/chown/src/chown.rs | 2 ++ src/uu/chroot/src/chroot.rs | 2 ++ src/uu/cksum/src/cksum.rs | 2 ++ src/uu/comm/src/comm.rs | 2 ++ src/uu/cp/README.md | 4 +++ src/uu/cp/src/cp.rs | 6 ++-- src/uu/cut/src/buffer.rs | 2 ++ src/uu/cut/src/cut.rs | 10 +++--- src/uu/cut/src/ranges.rs | 2 ++ src/uu/date/src/date.rs | 3 ++ src/uu/df/src/df.rs | 3 ++ src/uu/dircolors/src/colors.rs | 2 ++ src/uu/dircolors/src/dircolors.rs | 2 ++ src/uu/du/src/du.rs | 2 ++ src/uu/env/src/env.rs | 2 ++ src/uu/expand/src/expand.rs | 2 ++ src/uu/expr/src/syntax_tree.rs | 9 +++-- src/uu/expr/src/tokens.rs | 2 ++ src/uu/factor/build.rs | 4 ++- src/uu/factor/sieve.rs | 2 ++ src/uu/factor/src/miller_rabin.rs | 2 ++ src/uu/factor/src/table.rs | 2 ++ src/uu/fmt/src/fmt.rs | 2 ++ src/uu/fmt/src/linebreak.rs | 2 ++ src/uu/fmt/src/parasplit.rs | 2 ++ src/uu/fold/src/fold.rs | 2 ++ src/uu/groups/src/groups.rs | 2 ++ src/uu/hashsum/src/hashsum.rs | 2 ++ src/uu/head/src/head.rs | 6 ++-- src/uu/hostid/src/hostid.rs | 2 ++ src/uu/hostname/src/hostname.rs | 2 ++ src/uu/id/src/id.rs | 2 ++ src/uu/install/src/install.rs | 34 ++++++++++--------- src/uu/install/src/mode.rs | 2 +- src/uu/join/src/join.rs | 2 ++ src/uu/kill/src/kill.rs | 2 ++ src/uu/ln/src/ln.rs | 2 ++ src/uu/logname/src/logname.rs | 2 ++ src/uu/ls/src/ls.rs | 2 ++ src/uu/mknod/src/mknod.rs | 2 ++ src/uu/mknod/src/parsemode.rs | 2 ++ src/uu/mktemp/src/mktemp.rs | 2 ++ src/uu/mktemp/src/tempdir.rs | 2 ++ src/uu/more/src/more.rs | 2 ++ src/uu/mv/src/mv.rs | 16 +++++---- src/uu/nice/src/nice.rs | 2 ++ src/uu/nl/src/helper.rs | 2 ++ src/uu/nl/src/nl.rs | 2 ++ src/uu/nohup/src/nohup.rs | 2 ++ src/uu/nproc/src/nproc.rs | 2 ++ src/uu/od/src/byteorder_io.rs | 2 ++ src/uu/od/src/formatteriteminfo.rs | 2 ++ src/uu/od/src/inputoffset.rs | 4 +-- src/uu/od/src/multifilereader.rs | 2 ++ src/uu/od/src/od.rs | 12 ++++--- src/uu/od/src/output_info.rs | 2 ++ src/uu/od/src/parse_formats.rs | 8 +++-- src/uu/od/src/parse_inputs.rs | 24 ++++++------- src/uu/od/src/partialreader.rs | 14 ++++---- src/uu/od/src/peekreader.rs | 2 ++ src/uu/od/src/prn_char.rs | 2 ++ src/uu/od/src/prn_int.rs | 2 ++ src/uu/paste/src/paste.rs | 2 ++ src/uu/pathchk/src/pathchk.rs | 2 ++ src/uu/pinky/src/pinky.rs | 2 ++ src/uu/printf/src/cli.rs | 2 ++ src/uu/printf/src/memo.rs | 2 +- src/uu/printf/src/printf.rs | 3 ++ .../src/tokenize/num_format/format_field.rs | 4 ++- .../src/tokenize/num_format/formatter.rs | 4 ++- .../num_format/formatters/base_conv/mod.rs | 2 ++ .../num_format/formatters/base_conv/tests.rs | 2 ++ .../formatters/cninetyninehexfloatf.rs | 2 ++ .../tokenize/num_format/formatters/decf.rs | 2 ++ .../num_format/formatters/float_common.rs | 2 ++ .../tokenize/num_format/formatters/floatf.rs | 2 ++ .../tokenize/num_format/formatters/intf.rs | 4 ++- .../src/tokenize/num_format/formatters/mod.rs | 2 ++ .../tokenize/num_format/formatters/scif.rs | 2 ++ .../src/tokenize/num_format/num_format.rs | 2 ++ src/uu/printf/src/tokenize/sub.rs | 2 ++ src/uu/printf/src/tokenize/token.rs | 2 +- src/uu/printf/src/tokenize/unescaped_text.rs | 2 ++ src/uu/ptx/src/ptx.rs | 2 ++ src/uu/readlink/src/readlink.rs | 2 ++ src/uu/realpath/src/realpath.rs | 2 ++ src/uu/relpath/src/relpath.rs | 2 ++ src/uu/rm/src/rm.rs | 2 ++ src/uu/seq/src/seq.rs | 2 ++ src/uu/shred/src/shred.rs | 2 ++ src/uu/shuf/src/shuf.rs | 2 ++ src/uu/sort/src/sort.rs | 4 ++- src/uu/split/src/split.rs | 2 ++ src/uu/stat/src/fsext.rs | 3 +- src/uu/stat/src/stat.rs | 2 ++ src/uu/stat/src/test_stat.rs | 2 ++ src/uu/stdbuf/build.rs | 2 ++ src/uu/stdbuf/src/libstdbuf/build.rs | 2 ++ src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs | 2 ++ src/uu/stdbuf/src/stdbuf.rs | 2 ++ src/uu/sum/src/sum.rs | 2 ++ src/uu/tac/src/tac.rs | 2 ++ src/uu/tail/src/platform/redox.rs | 2 ++ src/uu/tail/src/platform/unix.rs | 2 ++ src/uu/tail/src/tail.rs | 2 ++ src/uu/test/src/test.rs | 2 ++ src/uu/timeout/src/timeout.rs | 2 ++ src/uu/touch/src/touch.rs | 2 ++ src/uu/tr/src/expand.rs | 2 ++ src/uu/tr/src/tr.rs | 2 ++ src/uu/truncate/src/truncate.rs | 2 ++ src/uu/tty/src/tty.rs | 2 ++ src/uu/uname/src/uname.rs | 2 ++ src/uu/unexpand/src/unexpand.rs | 2 ++ src/uu/unlink/src/unlink.rs | 2 ++ src/uu/uptime/src/uptime.rs | 2 ++ src/uu/wc/src/wc.rs | 8 +++-- src/uu/who/src/who.rs | 2 ++ src/uu/whoami/src/platform/mod.rs | 2 ++ src/uu/whoami/src/platform/unix.rs | 2 ++ src/uu/whoami/src/platform/windows.rs | 2 ++ src/uu/whoami/src/whoami.rs | 2 ++ util/test-repo-whitespace.BAT | 2 +- 133 files changed, 332 insertions(+), 93 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 195342b8a..0a72a4658 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -1,6 +1,4 @@ -# spell-checker:ignore (cargo-make) duckscript macos -# spell-checker:ignore (rust) clippy -# spell-checker:ignore (uutils) uutil uutils +# spell-checker:ignore (cargo-make) duckscript [config] min_version = "0.26.2" diff --git a/build.rs b/build.rs index 34c62d210..6998d60a4 100644 --- a/build.rs +++ b/build.rs @@ -1,5 +1,4 @@ -// spell-checker:ignore (utils) chgrp chmod chown chroot cksum dircolors hashsum hostid logname mkdir mkfifo mknod mktemp nohup nproc numfmt pathchk printenv printf readlink realpath relpath rmdir shuf stdbuf tsort uname unexpand whoami -// spell-checker:ignore () uutils uumain rustfmt rustc macos krate +// spell-checker:ignore (vars) krate use std::env; use std::fs::File; diff --git a/src/bin/coreutils.rs b/src/bin/coreutils.rs index 955cd6efe..a5e1ab839 100644 --- a/src/bin/coreutils.rs +++ b/src/bin/coreutils.rs @@ -7,11 +7,6 @@ * file that was distributed with this source code. */ -// spell-checker:ignore (acronyms/names) Gehring -// spell-checker:ignore (rustlang/crates) clippy concat rustlang termwidth textwrap -// spell-checker:ignore (uutils) coreutils sigpipe uucore uumain uutils -// spell-checker:ignore (shell) busybox symlinks - extern crate lazy_static; extern crate textwrap; extern crate uucore; diff --git a/src/uu/base32/src/base_common.rs b/src/uu/base32/src/base_common.rs index 361429d94..f6db40692 100644 --- a/src/uu/base32/src/base_common.rs +++ b/src/uu/base32/src/base_common.rs @@ -7,12 +7,12 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -use uucore::encoding::{wrap_print, Data, Format}; - use std::fs::File; use std::io::{stdin, BufReader, Read}; use std::path::Path; +use uucore::encoding::{wrap_print, Data, Format}; + pub fn execute( args: Vec, syntax: &str, diff --git a/src/uu/base64/src/base_common.rs b/src/uu/base64/src/base_common.rs index 361429d94..f6db40692 100644 --- a/src/uu/base64/src/base_common.rs +++ b/src/uu/base64/src/base_common.rs @@ -7,12 +7,12 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -use uucore::encoding::{wrap_print, Data, Format}; - use std::fs::File; use std::io::{stdin, BufReader, Read}; use std::path::Path; +use uucore::encoding::{wrap_print, Data, Format}; + pub fn execute( args: Vec, syntax: &str, diff --git a/src/uu/basename/src/basename.rs b/src/uu/basename/src/basename.rs index 5b78b3567..55995ad4f 100644 --- a/src/uu/basename/src/basename.rs +++ b/src/uu/basename/src/basename.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) fullname + #[macro_use] extern crate uucore; diff --git a/src/uu/cat/Cargo.toml b/src/uu/cat/Cargo.toml index d896fa764..c425401a3 100644 --- a/src/uu/cat/Cargo.toml +++ b/src/uu/cat/Cargo.toml @@ -3,7 +3,7 @@ name = "uu_cat" version = "0.0.1" authors = ["uutils developers"] license = "MIT" -description = "cat ~ (uutils) concatentate and display input" +description = "cat ~ (uutils) concatenate and display input" homepage = "https://github.com/uutils/coreutils" repository = "https://github.com/uutils/coreutils/tree/master/src/uu/cat" diff --git a/src/uu/cat/src/cat.rs b/src/uu/cat/src/cat.rs index e65687c66..f207dae1e 100644 --- a/src/uu/cat/src/cat.rs +++ b/src/uu/cat/src/cat.rs @@ -7,6 +7,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) nonprint nonblank nonprinting + #[macro_use] extern crate quick_error; #[cfg(unix)] @@ -265,7 +267,7 @@ fn open(path: &str) -> CatResult { /// /// # Arguments /// -/// * `files` - There is no short circuit when encountiner an error +/// * `files` - There is no short circuit when encountering an error /// reading a file in this vector fn write_fast(files: Vec) -> CatResult<()> { let mut writer = stdout(); @@ -310,7 +312,7 @@ struct OutputState { /// /// # Arguments /// -/// * `files` - There is no short circuit when encountiner an error +/// * `files` - There is no short circuit when encountering an error /// reading a file in this vector fn write_lines(files: Vec, options: &OutputOptions) -> CatResult<()> { let mut error_count = 0; @@ -332,7 +334,7 @@ fn write_lines(files: Vec, options: &OutputOptions) -> CatResult<()> { } } -/// Outputs file contents to stdout in a linewise fashion, +/// Outputs file contents to stdout in a line-by-line fashion, /// propagating any errors that might occur. fn write_file_lines(file: &str, options: &OutputOptions, state: &mut OutputState) -> CatResult<()> { let mut handle = open(file)?; diff --git a/src/uu/chgrp/src/chgrp.rs b/src/uu/chgrp/src/chgrp.rs index 78af36398..f381bcbb3 100644 --- a/src/uu/chgrp/src/chgrp.rs +++ b/src/uu/chgrp/src/chgrp.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) COMFOLLOW Chgrper RFILE RFILE's derefer dgid nonblank nonprint nonprinting + #[macro_use] extern crate uucore; pub use uucore::entries; diff --git a/src/uu/chmod/src/chmod.rs b/src/uu/chmod/src/chmod.rs index 4255ae178..20b76546b 100644 --- a/src/uu/chmod/src/chmod.rs +++ b/src/uu/chmod/src/chmod.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) Chmoder cmode fmode fperm fref ugoa RFILE RFILE's + #[cfg(unix)] extern crate libc; extern crate walker; diff --git a/src/uu/chown/src/chown.rs b/src/uu/chown/src/chown.rs index 2ecd49f43..acd6cb825 100644 --- a/src/uu/chown/src/chown.rs +++ b/src/uu/chown/src/chown.rs @@ -7,6 +7,8 @@ #![cfg_attr(feature = "clippy", feature(plugin))] #![cfg_attr(feature = "clippy", plugin(clippy))] +// spell-checker:ignore (ToDO) COMFOLLOW Chowner Passwd RFILE RFILE's derefer dgid duid + #[macro_use] extern crate uucore; pub use uucore::entries::{self, Group, Locate, Passwd}; diff --git a/src/uu/chroot/src/chroot.rs b/src/uu/chroot/src/chroot.rs index a8122deb9..f439e1f4f 100644 --- a/src/uu/chroot/src/chroot.rs +++ b/src/uu/chroot/src/chroot.rs @@ -6,6 +6,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) NEWROOT Userspec pstatus + extern crate getopts; #[macro_use] diff --git a/src/uu/cksum/src/cksum.rs b/src/uu/cksum/src/cksum.rs index 14b2edb32..f22cf91f5 100644 --- a/src/uu/cksum/src/cksum.rs +++ b/src/uu/cksum/src/cksum.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) fname + #[macro_use] extern crate uucore; diff --git a/src/uu/comm/src/comm.rs b/src/uu/comm/src/comm.rs index 54c0a7115..e2517ee60 100644 --- a/src/uu/comm/src/comm.rs +++ b/src/uu/comm/src/comm.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) delim mkdelim + extern crate getopts; #[macro_use] diff --git a/src/uu/cp/README.md b/src/uu/cp/README.md index d536e5c47..499d7cb31 100644 --- a/src/uu/cp/README.md +++ b/src/uu/cp/README.md @@ -1,5 +1,9 @@ + + ## Feature list + + ### To Do - [ ] archive diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index 224165c05..01e911b58 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -8,6 +8,8 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. +// spell-checker:ignore (ToDO) ficlone linkgs lstat nlink nlinks pathbuf reflink strs xattrs + extern crate clap; extern crate filetime; #[cfg(target_os = "linux")] @@ -690,7 +692,7 @@ fn parse_path_args(path_args: &[String], options: &Options) -> CopyResult<(Vec { - // All path arges are sources, and the target dir was + // All path args are sources, and the target dir was // specified separately (paths, PathBuf::from(target)) } @@ -1041,7 +1043,7 @@ fn handle_existing_dest(source: &Path, dest: &Path, options: &Options) -> CopyRe } /// Copy the a file from `source` to `dest`. No path manipulation is -/// done on either `source` or `dest`, the are used as provieded. +/// done on either `source` or `dest`, the are used as provided. /// /// Behavior when copying to existing files is contingent on the /// `options.overwrite` mode. If a file is skipped, the return type diff --git a/src/uu/cut/src/buffer.rs b/src/uu/cut/src/buffer.rs index 54003f274..3b211161e 100644 --- a/src/uu/cut/src/buffer.rs +++ b/src/uu/cut/src/buffer.rs @@ -10,6 +10,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) SRes Newl + use std::io::Result as IoResult; use std::io::{BufRead, BufReader, Read, Write}; diff --git a/src/uu/cut/src/cut.rs b/src/uu/cut/src/cut.rs index 7cf8fa776..4c2dd8b58 100644 --- a/src/uu/cut/src/cut.rs +++ b/src/uu/cut/src/cut.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) delim sourcefiles + #[macro_use] extern crate uucore; @@ -110,7 +112,7 @@ struct Options { struct FieldOptions { delimiter: String, // one char long, String because of UTF8 representation - out_delimeter: Option, + out_delimiter: Option, only_delimited: bool, zero_terminated: bool, } @@ -288,7 +290,7 @@ fn cut_fields_delimiter( #[allow(clippy::cognitive_complexity)] fn cut_fields(reader: R, ranges: &[Range], opts: &FieldOptions) -> i32 { let newline_char = if opts.zero_terminated { b'\0' } else { b'\n' }; - if let Some(ref o_delim) = opts.out_delimeter { + if let Some(ref o_delim) = opts.out_delimiter { return cut_fields_delimiter( reader, ranges, @@ -498,7 +500,7 @@ pub fn uumain(args: Vec) -> i32 { ranges, FieldOptions { delimiter: delim, - out_delimeter: out_delim, + out_delimiter: out_delim, only_delimited, zero_terminated, }, @@ -509,7 +511,7 @@ pub fn uumain(args: Vec) -> i32 { ranges, FieldOptions { delimiter: "\t".to_owned(), - out_delimeter: out_delim, + out_delimiter: out_delim, only_delimited, zero_terminated, }, diff --git a/src/uu/cut/src/ranges.rs b/src/uu/cut/src/ranges.rs index 85b20fe38..254200edf 100644 --- a/src/uu/cut/src/ranges.rs +++ b/src/uu/cut/src/ranges.rs @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) inval + use std::str::FromStr; #[derive(PartialEq, Eq, PartialOrd, Ord, Debug)] diff --git a/src/uu/date/src/date.rs b/src/uu/date/src/date.rs index 62546f8be..a82bb06cb 100644 --- a/src/uu/date/src/date.rs +++ b/src/uu/date/src/date.rs @@ -6,6 +6,9 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (format) MMDDhhmm +// spell-checker:ignore (ToDO) DATEFILE + extern crate chrono; extern crate clap; diff --git a/src/uu/df/src/df.rs b/src/uu/df/src/df.rs index cac445a07..95ee21f2f 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -6,6 +6,9 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. +// spell-checker:ignore (ToDO) mountinfo mtab BLOCKSIZE getmntinfo fobj mptr noatime Iused overmounted +// spell-checker:ignore (libc/fs) asyncreads asyncwrites autofs bavail bfree bsize charspare cifs debugfs devfs devpts ffree frsize fsid fstypename fusectl inode inodes iosize kernfs mntbufp mntfromname mntonname mqueue namemax pipefs smbfs statfs statvfs subfs syncreads syncwrites sysfs wcslen + extern crate clap; extern crate libc; extern crate number_prefix; diff --git a/src/uu/dircolors/src/colors.rs b/src/uu/dircolors/src/colors.rs index e9cea624f..e313078ab 100644 --- a/src/uu/dircolors/src/colors.rs +++ b/src/uu/dircolors/src/colors.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) EIGHTBIT ETERM MULTIHARDLINK cpio dtterm jfbterm konsole kterm mlterm rmvb rxvt stat'able svgz tmux webm xspf + pub const INTERNAL_DB: &str = r#"# Configuration file for dircolors, a utility to help you set the # LS_COLORS environment variable used by GNU ls with the --color option. # Copyright (C) 1996-2016 Free Software Foundation, Inc. diff --git a/src/uu/dircolors/src/dircolors.rs b/src/uu/dircolors/src/dircolors.rs index 9227f4241..c88a1aa24 100644 --- a/src/uu/dircolors/src/dircolors.rs +++ b/src/uu/dircolors/src/dircolors.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) clrtoeol dircolors eightbit endcode fnmatch leftcode multihardlink rightcode setenv sgid suid + extern crate glob; #[macro_use] diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index c9da05747..51fb5dd2c 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) BLOCKSIZE inode inodes ment strs + extern crate time; #[macro_use] diff --git a/src/uu/env/src/env.rs b/src/uu/env/src/env.rs index e1153d596..741348019 100644 --- a/src/uu/env/src/env.rs +++ b/src/uu/env/src/env.rs @@ -7,6 +7,8 @@ /* last synced with: env (GNU coreutils) 8.13 */ +// spell-checker:ignore (ToDO) execvp progname subcommand subcommands unsets + #[macro_use] extern crate clap; diff --git a/src/uu/expand/src/expand.rs b/src/uu/expand/src/expand.rs index da2fbeb3a..7ad5db4b0 100644 --- a/src/uu/expand/src/expand.rs +++ b/src/uu/expand/src/expand.rs @@ -7,6 +7,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) ctype cwidth iflag nbytes nspaces nums tspaces uflag + extern crate getopts; extern crate unicode_width; diff --git a/src/uu/expr/src/syntax_tree.rs b/src/uu/expr/src/syntax_tree.rs index 85a1efedb..d56bab4fc 100644 --- a/src/uu/expr/src/syntax_tree.rs +++ b/src/uu/expr/src/syntax_tree.rs @@ -6,10 +6,12 @@ //* file that was distributed with this source code. //! -//! Here we employ shunting-yard algorithm for building AST from tokens according to operators' precedence and associativeness. +//! Here we employ shunting-yard algorithm for building AST from tokens according to operators' precedence and associative-ness. //! * https://en.wikipedia.org/wiki/Shunting-yard_algorithm //! +// spell-checker:ignore (ToDO) binop binops ints paren prec + use onig::{Regex, RegexOptions, Syntax}; use crate::tokens::Token; @@ -199,7 +201,10 @@ pub fn tokens_to_ast( maybe_dump_rpn(&out_stack); let result = ast_from_rpn(&mut out_stack); if !out_stack.is_empty() { - Err("syntax error (fist RPN token does not represent expression AST's root)".to_owned()) + Err( + "syntax error (first RPN token does not represent the root of the expression AST)" + .to_owned(), + ) } else { maybe_dump_ast(&result); result diff --git a/src/uu/expr/src/tokens.rs b/src/uu/expr/src/tokens.rs index b3c82f86a..558dae090 100644 --- a/src/uu/expr/src/tokens.rs +++ b/src/uu/expr/src/tokens.rs @@ -16,6 +16,8 @@ //! Hence all we need is to map the strings into the Token structures, except for some ugly fiddling with +-escaping. //! +// spell-checker:ignore (ToDO) paren + #[derive(Debug, Clone)] pub enum Token { Value { diff --git a/src/uu/factor/build.rs b/src/uu/factor/build.rs index 3a05d7fdd..77fa3851a 100644 --- a/src/uu/factor/build.rs +++ b/src/uu/factor/build.rs @@ -7,12 +7,14 @@ //! Generate a table of the multiplicative inverses of p_i mod 2^64 //! for the first 1027 odd primes (all 13 bit and smaller primes). -//! You can supply a commandline argument to override the default +//! You can supply a command line argument to override the default //! value of 1027 for the number of entries in the table. //! //! 2 has no multiplicative inverse mode 2^64 because 2 | 2^64, //! and in any case divisibility by two is trivial by checking the LSB. +// spell-checker:ignore (ToDO) invs newr newrp newtp outstr + #![cfg_attr(test, allow(dead_code))] use std::env::{self, args}; diff --git a/src/uu/factor/sieve.rs b/src/uu/factor/sieve.rs index 22a5fb00e..c10321a7f 100644 --- a/src/uu/factor/sieve.rs +++ b/src/uu/factor/sieve.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. +// spell-checker:ignore (ToDO) filts, minidx, minkey paridx + use std::iter::{Chain, Cycle, Map}; use std::slice::Iter; diff --git a/src/uu/factor/src/miller_rabin.rs b/src/uu/factor/src/miller_rabin.rs index f8ad493dd..63ef70d02 100644 --- a/src/uu/factor/src/miller_rabin.rs +++ b/src/uu/factor/src/miller_rabin.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (URL) appspot + use crate::numeric::*; // Small set of bases for the Miller-Rabin prime test, valid for all 64b integers; diff --git a/src/uu/factor/src/table.rs b/src/uu/factor/src/table.rs index 1edf6bad8..f62b7c63a 100644 --- a/src/uu/factor/src/table.rs +++ b/src/uu/factor/src/table.rs @@ -1,3 +1,5 @@ +// spell-checker: ignore (ToDO) INVS + use std::num::Wrapping; use crate::Factors; diff --git a/src/uu/fmt/src/fmt.rs b/src/uu/fmt/src/fmt.rs index cda4431b3..0797ce30d 100644 --- a/src/uu/fmt/src/fmt.rs +++ b/src/uu/fmt/src/fmt.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) PSKIP linebreak ostream parasplit tabwidth xanti xprefix + extern crate unicode_width; #[macro_use] diff --git a/src/uu/fmt/src/linebreak.rs b/src/uu/fmt/src/linebreak.rs index a0d445174..c41fd41bd 100644 --- a/src/uu/fmt/src/linebreak.rs +++ b/src/uu/fmt/src/linebreak.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) INFTY MULT accum breakwords linebreak linebreaking linebreaks linelen maxlength minlength nchars ostream overlen parasplit plass posn powf punct signum slen sstart tabwidth tlen underlen winfo wlen wordlen + use std::cmp; use std::i64; use std::io::{BufWriter, Stdout, Write}; diff --git a/src/uu/fmt/src/parasplit.rs b/src/uu/fmt/src/parasplit.rs index c3315402f..ddf6f394b 100644 --- a/src/uu/fmt/src/parasplit.rs +++ b/src/uu/fmt/src/parasplit.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) INFTY MULT PSKIP accum aftertab beforetab breakwords fmt's formatline linebreak linebreaking linebreaks linelen maxlength minlength nchars noformat noformatline ostream overlen parasplit pfxind plass pmatch poffset posn powf prefixindent punct signum slen sstart tabwidth tlen underlen winfo wlen wordlen wordsplits xanti xprefix + use std::io::{BufRead, Lines}; use std::iter::Peekable; use std::slice::Iter; diff --git a/src/uu/fold/src/fold.rs b/src/uu/fold/src/fold.rs index e3321d19d..066c05de1 100644 --- a/src/uu/fold/src/fold.rs +++ b/src/uu/fold/src/fold.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDOs) ncount routput + #[macro_use] extern crate uucore; diff --git a/src/uu/groups/src/groups.rs b/src/uu/groups/src/groups.rs index 0cfad3560..93e973c44 100644 --- a/src/uu/groups/src/groups.rs +++ b/src/uu/groups/src/groups.rs @@ -6,6 +6,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) passwd + #[macro_use] extern crate uucore; use uucore::entries::{get_groups, gid2grp, Locate, Passwd}; diff --git a/src/uu/hashsum/src/hashsum.rs b/src/uu/hashsum/src/hashsum.rs index afcc80361..9f59ed4a4 100644 --- a/src/uu/hashsum/src/hashsum.rs +++ b/src/uu/hashsum/src/hashsum.rs @@ -7,6 +7,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) algo, algoname, regexes, nread + extern crate getopts; extern crate hex; extern crate md5; diff --git a/src/uu/head/src/head.rs b/src/uu/head/src/head.rs index 97a34e8c7..e05f0d448 100644 --- a/src/uu/head/src/head.rs +++ b/src/uu/head/src/head.rs @@ -131,16 +131,16 @@ pub fn uumain(args: Vec) -> i32 { let mut buffer = BufReader::new(stdin()); head(&mut buffer, &settings); } else { - let mut firstime = true; + let mut first_time = true; for file in &files { if settings.verbose { - if !firstime { + if !first_time { println!(); } println!("==> {} <==", file); } - firstime = false; + first_time = false; let path = Path::new(file); let reader = File::open(&path).unwrap(); diff --git a/src/uu/hostid/src/hostid.rs b/src/uu/hostid/src/hostid.rs index 1bb61086c..d357e6d8a 100644 --- a/src/uu/hostid/src/hostid.rs +++ b/src/uu/hostid/src/hostid.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. +// spell-checker:ignore (ToDO) gethostid + extern crate libc; #[macro_use] diff --git a/src/uu/hostname/src/hostname.rs b/src/uu/hostname/src/hostname.rs index 326bad340..99eadaa17 100644 --- a/src/uu/hostname/src/hostname.rs +++ b/src/uu/hostname/src/hostname.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) MAKEWORD addrs hashset + extern crate clap; extern crate hostname; extern crate libc; diff --git a/src/uu/id/src/id.rs b/src/uu/id/src/id.rs index 706e9912b..97fa517f2 100644 --- a/src/uu/id/src/id.rs +++ b/src/uu/id/src/id.rs @@ -10,6 +10,8 @@ // http://ftp-archive.freebsd.org/mirror/FreeBSD-Archive/old-releases/i386/1.0-RELEASE/ports/shellutils/src/id.c // http://www.opensource.apple.com/source/shell_cmds/shell_cmds-118/id/id.c +// spell-checker:ignore (ToDO) asid auditid auditinfo auid cstr egid emod euid getaudit getlogin gflag nflag pline rflag termid uflag + #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index 52e359a89..c3e13e52a 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. +// spell-checker:ignore (ToDO) rwxr sourcepath targetpath + extern crate getopts; extern crate libc; @@ -25,7 +27,7 @@ static LONG_HELP: &str = ""; const DEFAULT_MODE: u32 = 755; #[allow(dead_code)] -pub struct Behaviour { +pub struct Behavior { main_function: MainFunction, specified_mode: Option, suffix: String, @@ -40,7 +42,7 @@ pub enum MainFunction { Standard, } -impl Behaviour { +impl Behavior { /// Determine the mode for chmod after copy. pub fn mode(&self) -> u32 { match self.specified_mode { @@ -62,7 +64,7 @@ pub fn uumain(args: Vec) -> i32 { return 2; } - let behaviour = match behaviour(&matches) { + let behavior = match behavior(&matches) { Ok(x) => x, Err(ret) => { return ret; @@ -80,9 +82,9 @@ pub fn uumain(args: Vec) -> i32 { arguments.map(to_owned).collect() }; - match behaviour.main_function { - MainFunction::Directory => directory(&paths[..], behaviour), - MainFunction::Standard => standard(&paths[..], behaviour), + match behavior.main_function { + MainFunction::Directory => directory(&paths[..], behavior), + MainFunction::Standard => standard(&paths[..], behavior), } } @@ -251,15 +253,15 @@ fn check_unimplemented(matches: &getopts::Matches) -> Result<(), &str> { } } -/// Determine behaviour, given command line arguments. +/// Determine behavior, given command line arguments. /// -/// If successful, returns a filled-out Behaviour struct. +/// If successful, returns a filled-out Behavior struct. /// /// # Errors /// /// In event of failure, returns an integer intended as a program return code. /// -fn behaviour(matches: &getopts::Matches) -> Result { +fn behavior(matches: &getopts::Matches) -> Result { let main_function = if matches.opt_present("directory") { MainFunction::Directory } else { @@ -306,7 +308,7 @@ fn behaviour(matches: &getopts::Matches) -> Result { "~".to_owned() }; - Ok(Behaviour { + Ok(Behavior { main_function, specified_mode, suffix: backup_suffix, @@ -321,7 +323,7 @@ fn behaviour(matches: &getopts::Matches) -> Result { /// /// Returns an integer intended as a program return code. /// -fn directory(paths: &[PathBuf], b: Behaviour) -> i32 { +fn directory(paths: &[PathBuf], b: Behavior) -> i32 { if paths.is_empty() { println!("{} with -d requires at least one argument.", NAME); 1 @@ -363,11 +365,11 @@ fn is_new_file_path(path: &Path) -> bool { path.is_file() || !path.exists() && path.parent().map(Path::is_dir).unwrap_or(true) } -/// Perform an install, given a list of paths and behaviour. +/// Perform an install, given a list of paths and behavior. /// /// Returns an integer intended as a program return code. /// -fn standard(paths: &[PathBuf], b: Behaviour) -> i32 { +fn standard(paths: &[PathBuf], b: Behavior) -> i32 { if paths.len() < 2 { println!("{} requires at least 2 arguments.", NAME); 1 @@ -393,7 +395,7 @@ fn standard(paths: &[PathBuf], b: Behaviour) -> i32 { /// _files_ must all exist as non-directories. /// _target_dir_ must be a directory. /// -fn copy_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) -> i32 { +fn copy_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behavior) -> i32 { if !target_dir.is_dir() { show_error!("target ‘{}’ is not a directory", target_dir.display()); return 1; @@ -435,7 +437,7 @@ fn copy_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) - /// _file_ must exist as a non-directory. /// _target_ must be a non-directory /// -fn copy_file_to_file(file: &PathBuf, target: &PathBuf, b: &Behaviour) -> i32 { +fn copy_file_to_file(file: &PathBuf, target: &PathBuf, b: &Behavior) -> i32 { if copy(file, &target, b).is_err() { 1 } else { @@ -454,7 +456,7 @@ fn copy_file_to_file(file: &PathBuf, target: &PathBuf, b: &Behaviour) -> i32 { /// /// If the copy system call fails, we print a verbose error and return an empty error value. /// -fn copy(from: &PathBuf, to: &PathBuf, b: &Behaviour) -> Result<(), ()> { +fn copy(from: &PathBuf, to: &PathBuf, b: &Behavior) -> Result<(), ()> { let io_result = fs::copy(from, to); if let Err(err) = io_result { diff --git a/src/uu/install/src/mode.rs b/src/uu/install/src/mode.rs index 06f458dc7..9c8eb2de0 100644 --- a/src/uu/install/src/mode.rs +++ b/src/uu/install/src/mode.rs @@ -9,7 +9,7 @@ use uucore::mode; pub fn parse(mode_string: &str, considering_dir: bool) -> Result { let numbers: &[char] = &['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; - // Passing 000 as the existing permissions seems to mirror GNU behaviour. + // Passing 000 as the existing permissions seems to mirror GNU behavior. if mode_string.contains(numbers) { mode::parse_numeric(0, mode_string) } else { diff --git a/src/uu/join/src/join.rs b/src/uu/join/src/join.rs index 861ad598e..5d0e0e561 100644 --- a/src/uu/join/src/join.rs +++ b/src/uu/join/src/join.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) autoformat FILENUM whitespaces pairable unpairable nocheck + extern crate clap; #[macro_use] diff --git a/src/uu/kill/src/kill.rs b/src/uu/kill/src/kill.rs index 896166daf..9ce4b3c11 100644 --- a/src/uu/kill/src/kill.rs +++ b/src/uu/kill/src/kill.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. +// spell-checker:ignore (ToDO) signalname pids + extern crate libc; #[macro_use] diff --git a/src/uu/ln/src/ln.rs b/src/uu/ln/src/ln.rs index 9c2a08f86..a00052950 100644 --- a/src/uu/ln/src/ln.rs +++ b/src/uu/ln/src/ln.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) srcpath targetpath EEXIST + #[macro_use] extern crate uucore; diff --git a/src/uu/logname/src/logname.rs b/src/uu/logname/src/logname.rs index 37ce5e689..bbe2dddae 100644 --- a/src/uu/logname/src/logname.rs +++ b/src/uu/logname/src/logname.rs @@ -7,6 +7,8 @@ /* last synced with: logname (GNU coreutils) 8.22 */ +// spell-checker:ignore (ToDO) getlogin userlogin + extern crate libc; #[macro_use] diff --git a/src/uu/ls/src/ls.rs b/src/uu/ls/src/ls.rs index 64dbf4f42..5d946dd8d 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. +// spell-checker:ignore (ToDO) cpio svgz webm somegroup nlink rmvb xspf + extern crate getopts; #[cfg(unix)] extern crate isatty; diff --git a/src/uu/mknod/src/mknod.rs b/src/uu/mknod/src/mknod.rs index a24e2700d..9e4eb161c 100644 --- a/src/uu/mknod/src/mknod.rs +++ b/src/uu/mknod/src/mknod.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) parsemode makedev sysmacros makenod newmode perror IFBLK IFCHR IFIFO + extern crate getopts; extern crate libc; diff --git a/src/uu/mknod/src/parsemode.rs b/src/uu/mknod/src/parsemode.rs index 688b3d5c7..e995d93b9 100644 --- a/src/uu/mknod/src/parsemode.rs +++ b/src/uu/mknod/src/parsemode.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) fperm + extern crate libc; use libc::{mode_t, S_IRGRP, S_IROTH, S_IRUSR, S_IWGRP, S_IWOTH, S_IWUSR}; diff --git a/src/uu/mktemp/src/mktemp.rs b/src/uu/mktemp/src/mktemp.rs index 3320112da..3ae9211ca 100644 --- a/src/uu/mktemp/src/mktemp.rs +++ b/src/uu/mktemp/src/mktemp.rs @@ -6,6 +6,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (ToDO) tempfile tempdir SUFF TMPDIR tmpname + extern crate getopts; extern crate rand; extern crate tempfile; diff --git a/src/uu/mktemp/src/tempdir.rs b/src/uu/mktemp/src/tempdir.rs index 187ade269..10c0bb62a 100644 --- a/src/uu/mktemp/src/tempdir.rs +++ b/src/uu/mktemp/src/tempdir.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) tempdir tmpdir + // Mainly taken from crate `tempdir` extern crate rand; diff --git a/src/uu/more/src/more.rs b/src/uu/more/src/more.rs index 46d0f49a9..18e69a836 100644 --- a/src/uu/more/src/more.rs +++ b/src/uu/more/src/more.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. +// spell-checker:ignore (ToDO) lflag ICANON tcgetattr tcsetattr TCSADRAIN + extern crate getopts; #[macro_use] diff --git a/src/uu/mv/src/mv.rs b/src/uu/mv/src/mv.rs index 2fe68e611..42f4f3134 100644 --- a/src/uu/mv/src/mv.rs +++ b/src/uu/mv/src/mv.rs @@ -6,6 +6,8 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. +// spell-checker:ignore (ToDO) sourcepath targetpath + extern crate fs_extra; extern crate getopts; @@ -26,7 +28,7 @@ use fs_extra::dir::{move_dir, CopyOptions as DirCopyOptions}; static NAME: &str = "mv"; static VERSION: &str = env!("CARGO_PKG_VERSION"); -pub struct Behaviour { +pub struct Behavior { overwrite: OverwriteMode, backup: BackupMode, suffix: String, @@ -117,7 +119,7 @@ pub fn uumain(args: Vec) -> i32 { return 1; } - let behaviour = Behaviour { + let behavior = Behavior { overwrite: overwrite_mode, backup: backup_mode, suffix: backup_suffix, @@ -147,7 +149,7 @@ pub fn uumain(args: Vec) -> i32 { help(&usage); 0 } else { - exec(&paths[..], behaviour) + exec(&paths[..], behavior) } } @@ -225,7 +227,7 @@ fn help(usage: &str) { ); } -fn exec(files: &[PathBuf], b: Behaviour) -> i32 { +fn exec(files: &[PathBuf], b: Behavior) -> i32 { if let Some(ref name) = b.target_dir { return move_files_into_dir(files, &PathBuf::from(name), &b); } @@ -309,7 +311,7 @@ fn exec(files: &[PathBuf], b: Behaviour) -> i32 { 0 } -fn move_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) -> i32 { +fn move_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behavior) -> i32 { if !target_dir.is_dir() { show_error!("target ‘{}’ is not a directory", target_dir.display()); return 1; @@ -347,7 +349,7 @@ fn move_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) - } } -fn rename(from: &PathBuf, to: &PathBuf, b: &Behaviour) -> io::Result<()> { +fn rename(from: &PathBuf, to: &PathBuf, b: &Behavior) -> io::Result<()> { let mut backup_path = None; if to.exists() { @@ -413,7 +415,7 @@ fn rename_with_fallback(from: &PathBuf, to: &PathBuf) -> io::Result<()> { rename_symlink_fallback(&from, &to)?; } else if file_type.is_dir() { // We remove the destination directory if it exists to match the - // behaviour of `fs::rename`. As far as I can tell, `fs_extra`'s + // behavior of `fs::rename`. As far as I can tell, `fs_extra`'s // `move_dir` would otherwise behave differently. if to.exists() { fs::remove_dir_all(to)?; diff --git a/src/uu/nice/src/nice.rs b/src/uu/nice/src/nice.rs index 252160fc3..16692dfdd 100644 --- a/src/uu/nice/src/nice.rs +++ b/src/uu/nice/src/nice.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) getpriority execvp setpriority nstr PRIO cstrs ENOENT + extern crate getopts; extern crate libc; diff --git a/src/uu/nl/src/helper.rs b/src/uu/nl/src/helper.rs index 2eb5fa555..d3b78ea04 100644 --- a/src/uu/nl/src/helper.rs +++ b/src/uu/nl/src/helper.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv + extern crate getopts; extern crate regex; diff --git a/src/uu/nl/src/nl.rs b/src/uu/nl/src/nl.rs index ee0d569b3..14f710d5f 100644 --- a/src/uu/nl/src/nl.rs +++ b/src/uu/nl/src/nl.rs @@ -6,6 +6,8 @@ // * file that was distributed with this source code. // * +// spell-checker:ignore (ToDO) corasick memchr + extern crate aho_corasick; extern crate getopts; extern crate memchr; diff --git a/src/uu/nohup/src/nohup.rs b/src/uu/nohup/src/nohup.rs index c2b79e0e4..68d7e2a9a 100644 --- a/src/uu/nohup/src/nohup.rs +++ b/src/uu/nohup/src/nohup.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) execvp SIGHUP cproc vprocmgr cstrs homeout + extern crate getopts; extern crate libc; diff --git a/src/uu/nproc/src/nproc.rs b/src/uu/nproc/src/nproc.rs index 7f1849852..28aee4b12 100644 --- a/src/uu/nproc/src/nproc.rs +++ b/src/uu/nproc/src/nproc.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) NPROCESSORS nprocs numstr threadstr sysconf + extern crate getopts; extern crate num_cpus; diff --git a/src/uu/od/src/byteorder_io.rs b/src/uu/od/src/byteorder_io.rs index 5d7ad4cab..c22097da2 100644 --- a/src/uu/od/src/byteorder_io.rs +++ b/src/uu/od/src/byteorder_io.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) byteorder + // workaround until https://github.com/BurntSushi/byteorder/issues/41 has been fixed // based on: https://github.com/netvl/immeta/blob/4460ee/src/utils.rs#L76 diff --git a/src/uu/od/src/formatteriteminfo.rs b/src/uu/od/src/formatteriteminfo.rs index f7ca8d8ac..d44d97a92 100644 --- a/src/uu/od/src/formatteriteminfo.rs +++ b/src/uu/od/src/formatteriteminfo.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) formatteriteminfo + use std::fmt; #[derive(Copy)] diff --git a/src/uu/od/src/inputoffset.rs b/src/uu/od/src/inputoffset.rs index 8f3030edf..2bdf03ca4 100644 --- a/src/uu/od/src/inputoffset.rs +++ b/src/uu/od/src/inputoffset.rs @@ -70,7 +70,7 @@ fn test_input_offset() { sut.increase_position(10); assert_eq!("000014", &sut.format_byte_offset()); - // note normally the radix will not change after initialisation + // note normally the radix will not change after initialization sut.set_radix(Radix::Decimal); assert_eq!("0000020", &sut.format_byte_offset()); @@ -95,7 +95,7 @@ fn test_input_offset_with_label() { sut.increase_position(10); assert_eq!("000014 (00001E)", &sut.format_byte_offset()); - // note normally the radix will not change after initialisation + // note normally the radix will not change after initialization sut.set_radix(Radix::Decimal); assert_eq!("0000020 (0000030)", &sut.format_byte_offset()); diff --git a/src/uu/od/src/multifilereader.rs b/src/uu/od/src/multifilereader.rs index 2b177167a..dae9ece03 100644 --- a/src/uu/od/src/multifilereader.rs +++ b/src/uu/od/src/multifilereader.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) multifile curr fnames fname xfrd fillloop mockstream + use std::fs::File; use std::io; use std::io::BufReader; diff --git a/src/uu/od/src/od.rs b/src/uu/od/src/od.rs index e2fb7c290..e4e7b3a89 100644 --- a/src/uu/od/src/od.rs +++ b/src/uu/od/src/od.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) formatteriteminfo inputdecoder inputoffset mockstream nrofbytes partialreader odfunc multifile exitcode + extern crate byteorder; extern crate getopts; extern crate half; @@ -54,14 +56,14 @@ static USAGE: &str = r#"Usage: Displays data in various human-readable formats. If multiple formats are specified, the output will contain all formats in the order they appear on the -commandline. Each format will be printed on a new line. Only the line +command line. Each format will be printed on a new line. Only the line containing the first format will be prefixed with the offset. If no filename is specified, or it is "-", stdin will be used. After a "--", no -more options will be recognised. This allows for filenames starting with a "-". +more options will be recognized. This allows for filenames starting with a "-". If a filename is a valid number which can be used as an offset in the second -form, you can force it to be recognised as a filename if you include an option +form, you can force it to be recognized as a filename if you include an option like "-j0", which is only valid in the first form. RADIX is one of o,d,x,n for octal, decimal, hexadecimal or none. @@ -84,7 +86,7 @@ TYPE contains one or more format specifications consisting of: SIZE is the number of bytes which can be the number 1, 2, 4, 8 or 16, or C, I, S, L for 1, 2, 4, 8 bytes for integer types, or F, D, L for 4, 8, 16 bytes for floating point. -Any type specification can have a "z" suffic, which will add a ASCII dump at +Any type specification can have a "z" suffix, which will add a ASCII dump at the end of the line. If an error occurred, a diagnostic message will be printed to stderr, and the @@ -286,7 +288,7 @@ impl OdOptions { } } -/// parses and validates commandline parameters, prepares data structures, +/// parses and validates command line parameters, prepares data structures, /// opens the input and calls `odfunc` to process the input. pub fn uumain(args: Vec) -> i32 { let opts = create_getopts_options(); diff --git a/src/uu/od/src/output_info.rs b/src/uu/od/src/output_info.rs index 7107609db..b1f25e31f 100644 --- a/src/uu/od/src/output_info.rs +++ b/src/uu/od/src/output_info.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore formatteriteminfo blocksize thisblock + use std::cmp; use std::slice::Iter; diff --git a/src/uu/od/src/parse_formats.rs b/src/uu/od/src/parse_formats.rs index cc767ac65..930724d01 100644 --- a/src/uu/od/src/parse_formats.rs +++ b/src/uu/od/src/parse_formats.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore formatteriteminfo docopt fvox fvoxw vals acdx + use crate::formatteriteminfo::FormatterItemInfo; use crate::prn_char::*; use crate::prn_float::*; @@ -89,9 +91,9 @@ fn od_argument_with_option(ch: char) -> bool { } } -/// Parses format flags from commandline +/// Parses format flags from command line /// -/// getopts, docopt, clap don't seem suitable to parse the commandline +/// getopts, docopt, clap don't seem suitable to parse the command line /// arguments used for formats. In particular arguments can appear /// multiple times and the order they appear in, is significant. /// @@ -99,7 +101,7 @@ fn od_argument_with_option(ch: char) -> bool { /// it can also be mixed with non format related flags like -v: -fvox /// arguments with parameters like -w16 can only appear at the end: -fvoxw16 /// parameters of -t/--format specify 1 or more formats. -/// if -- appears on the commandline, parsing should stop. +/// if -- appears on the command line, parsing should stop. pub fn parse_format_flags(args: &[String]) -> Result, String> { let mut formats = Vec::new(); diff --git a/src/uu/od/src/parse_inputs.rs b/src/uu/od/src/parse_inputs.rs index 242a3abfd..89a833d94 100644 --- a/src/uu/od/src/parse_inputs.rs +++ b/src/uu/od/src/parse_inputs.rs @@ -2,7 +2,7 @@ use getopts::Matches; /// Abstraction for getopts pub trait CommandLineOpts { - /// returns all commandline parameters which do not belong to an option. + /// returns all command line parameters which do not belong to an option. fn inputs(&self) -> Vec; /// tests if any of the specified options is present. fn opts_present(&self, _: &[&str]) -> bool; @@ -31,7 +31,7 @@ pub enum CommandLineInputs { FileAndOffset((String, usize, Option)), } -/// Interprets the commandline inputs of od. +/// Interprets the command line inputs of od. /// /// Returns either an unspecified number of filenames. /// Or it will return a single filename, with an offset and optional label. @@ -45,7 +45,7 @@ pub fn parse_inputs(matches: &dyn CommandLineOpts) -> Result + // test if command line contains: [file] // fall-through if no (valid) offset is found if input_strings.len() == 1 || input_strings.len() == 2 { // if any of the options -A, -j, -N, -t, -v or -w are present there is no offset @@ -74,7 +74,7 @@ pub fn parse_inputs(matches: &dyn CommandLineOpts) -> Result) -> Result Result { let mut start = 0; let mut len = s.len(); @@ -159,10 +159,10 @@ pub fn parse_offset_operand(s: &str) -> Result { mod tests { use super::*; - /// A mock for the commandline options type + /// A mock for the command line options type /// - /// `inputs` are all commandline parameters which do not belong to an option. - /// `option_names` are the names of the options on the commandline. + /// `inputs` are all command line parameters which do not belong to an option. + /// `option_names` are the names of the options on the command line. struct MockOptions<'a> { inputs: Vec, option_names: Vec<&'a str>, @@ -245,13 +245,13 @@ mod tests { parse_inputs(&MockOptions::new(vec!["+10a"], vec![""])).unwrap() ); - // if -j is included in the commandline, there cannot be an offset. + // if -j is included in the command line, there cannot be an offset. assert_eq!( CommandLineInputs::FileNames(vec!["+10".to_string()]), parse_inputs(&MockOptions::new(vec!["+10"], vec!["j"])).unwrap() ); - // if -v is included in the commandline, there cannot be an offset. + // if -v is included in the command line, there cannot be an offset. assert_eq!( CommandLineInputs::FileNames(vec!["+10".to_string()]), parse_inputs(&MockOptions::new(vec!["+10"], vec!["o", "v"])).unwrap() @@ -278,7 +278,7 @@ mod tests { parse_inputs(&MockOptions::new(vec!["file1", "+10"], vec!["j"])).unwrap() ); - // offset must be last on the commandline + // offset must be last on the command line assert_eq!( CommandLineInputs::FileNames(vec!["+10".to_string(), "file1".to_string()]), parse_inputs(&MockOptions::new(vec!["+10", "file1"], vec![""])).unwrap() @@ -287,7 +287,7 @@ mod tests { #[test] fn test_parse_inputs_traditional() { - // it should not return FileAndOffset to signal no offset was entered on the commandline. + // it should not return FileAndOffset to signal no offset was entered on the command line. assert_eq!( CommandLineInputs::FileNames(vec!["-".to_string()]), parse_inputs(&MockOptions::new(vec![], vec!["traditional"])).unwrap() diff --git a/src/uu/od/src/partialreader.rs b/src/uu/od/src/partialreader.rs index e77adcf1a..2a71cea43 100644 --- a/src/uu/od/src/partialreader.rs +++ b/src/uu/od/src/partialreader.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore mockstream abcdefgh bcdefgh + use std::cmp; use std::io; use std::io::Read; @@ -147,7 +149,7 @@ mod tests { } #[test] - fn test_read_limitting_all() { + fn test_read_limiting_all() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(0)); @@ -155,7 +157,7 @@ mod tests { } #[test] - fn test_read_limitting() { + fn test_read_limiting() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(6)); @@ -164,7 +166,7 @@ mod tests { } #[test] - fn test_read_limitting_with_error() { + fn test_read_limiting_with_error() { let mut v = [0; 10]; let f = FailingMockStream::new(ErrorKind::PermissionDenied, "No access", 3); let mut sut = PartialReader::new(f, 0, Some(6)); @@ -175,7 +177,7 @@ mod tests { } #[test] - fn test_read_limitting_with_large_limit() { + fn test_read_limiting_with_large_limit() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(20)); @@ -184,7 +186,7 @@ mod tests { } #[test] - fn test_read_limitting_with_multiple_reads() { + fn test_read_limiting_with_multiple_reads() { let mut v = [0; 3]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(6)); @@ -196,7 +198,7 @@ mod tests { } #[test] - fn test_read_skipping_and_limitting() { + fn test_read_skipping_and_limiting() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 2, Some(4)); diff --git a/src/uu/od/src/peekreader.rs b/src/uu/od/src/peekreader.rs index 77dc6e56c..73a94d2e2 100644 --- a/src/uu/od/src/peekreader.rs +++ b/src/uu/od/src/peekreader.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) tempbuffer abcdefgh abcdefghij + //! Contains the trait `PeekRead` and type `PeekReader` implementing it. use std::io; diff --git a/src/uu/od/src/prn_char.rs b/src/uu/od/src/prn_char.rs index 895055b63..cbbb370ce 100644 --- a/src/uu/od/src/prn_char.rs +++ b/src/uu/od/src/prn_char.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) CHRS itembytes MUTF + use std::str::from_utf8; use crate::formatteriteminfo::*; diff --git a/src/uu/od/src/prn_int.rs b/src/uu/od/src/prn_int.rs index aa33919b9..b8397b01b 100644 --- a/src/uu/od/src/prn_int.rs +++ b/src/uu/od/src/prn_int.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) itembytes + use crate::formatteriteminfo::*; /// format string to print octal using `int_writer_unsigned` diff --git a/src/uu/paste/src/paste.rs b/src/uu/paste/src/paste.rs index 2f2b6eff7..0b0d1880a 100644 --- a/src/uu/paste/src/paste.rs +++ b/src/uu/paste/src/paste.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) delim + extern crate getopts; #[macro_use] diff --git a/src/uu/pathchk/src/pathchk.rs b/src/uu/pathchk/src/pathchk.rs index b0152d390..dd0cee3ef 100644 --- a/src/uu/pathchk/src/pathchk.rs +++ b/src/uu/pathchk/src/pathchk.rs @@ -7,6 +7,8 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. +// spell-checker:ignore (ToDO) lstat + extern crate getopts; extern crate libc; diff --git a/src/uu/pinky/src/pinky.rs b/src/uu/pinky/src/pinky.rs index 9d158870e..b9edb50a8 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -8,6 +8,8 @@ #![cfg_attr(feature = "clippy", feature(plugin))] #![cfg_attr(feature = "clippy", plugin(clippy))] +// spell-checker:ignore (ToDO) BUFSIZE gecos fullname, mesg iobuf + #[macro_use] extern crate uucore; use uucore::entries::{Locate, Passwd}; diff --git a/src/uu/printf/src/cli.rs b/src/uu/printf/src/cli.rs index 62aeb8a7c..12e80a925 100644 --- a/src/uu/printf/src/cli.rs +++ b/src/uu/printf/src/cli.rs @@ -1,5 +1,7 @@ //! stdio convenience fns +// spell-checker:ignore (ToDO) bslice + use std::env; use std::io::{stderr, stdout, Write}; diff --git a/src/uu/printf/src/memo.rs b/src/uu/printf/src/memo.rs index 2d6602184..2f12f9192 100644 --- a/src/uu/printf/src/memo.rs +++ b/src/uu/printf/src/memo.rs @@ -1,6 +1,6 @@ //! Memo runner of printf //! Takes a format string and arguments -//! 1. tokenizes format string into tokens, consuming +//! 1. tokenize format string into tokens, consuming //! any subst. arguments along the way. //! 2. feeds remaining arguments into function //! that prints tokens. diff --git a/src/uu/printf/src/printf.rs b/src/uu/printf/src/printf.rs index 8188fddde..3062d52de 100644 --- a/src/uu/printf/src/printf.rs +++ b/src/uu/printf/src/printf.rs @@ -1,5 +1,8 @@ #![allow(dead_code)] +// spell-checker:ignore (change!) each's +// spell-checker:ignore (ToDO) LONGHELP FORMATSTRING templating parameterizing formatstr + extern crate itertools; extern crate uucore; diff --git a/src/uu/printf/src/tokenize/num_format/format_field.rs b/src/uu/printf/src/tokenize/num_format/format_field.rs index eb59fde05..68786e815 100644 --- a/src/uu/printf/src/tokenize/num_format/format_field.rs +++ b/src/uu/printf/src/tokenize/num_format/format_field.rs @@ -1,4 +1,6 @@ -//! Primitievs used by Sub Tokenizer +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum fprim interp + +//! Primitives used by Sub Tokenizer //! and num_format modules #[derive(Clone)] pub enum FieldType { diff --git a/src/uu/printf/src/tokenize/num_format/formatter.rs b/src/uu/printf/src/tokenize/num_format/formatter.rs index 3b34d1b65..35faff2a9 100644 --- a/src/uu/printf/src/tokenize/num_format/formatter.rs +++ b/src/uu/printf/src/tokenize/num_format/formatter.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) inprefix for conv + //! Primitives used by num_format and sub_modules. //! never dealt with above (e.g. Sub Tokenizer never uses these) @@ -55,7 +57,7 @@ pub trait Formatter { inprefix: &InPrefix, str_in: &str, ) -> Option; - // return a string from a formatprimitive, + // return a string from a FormatPrimitive, // given information about the field fn primitive_to_str(&self, prim: &FormatPrimitive, field: FormatField) -> String; } diff --git a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs index f288e95cc..0ea984e0b 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) arrnum mult basenum bufferval refd vals arrfloat conv intermed addl + pub fn arrnum_int_mult(arr_num: &[u8], basenum: u8, base_ten_int_fact: u8) -> Vec { let mut carry: u16 = 0; let mut rem: u16; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs index 55e7fdfca..fcac4392e 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv arrnum mult shortcircuit + #[cfg(test)] use super::*; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs b/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs index 6e9cdc757..33c3a7af5 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum + //! formatter for %a %F C99 Hex-floating-point subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/decf.rs b/src/uu/printf/src/tokenize/num_format/formatters/decf.rs index 2cbb3f696..7974271a3 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/decf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/decf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum fprim interp + //! formatter for %g %G decimal subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs b/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs index 430af3347..65fe5b6ea 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum + use super::super::format_field::FormatField; use super::super::formatter::{get_it_at, warn_incomplete_conv, Base, FormatPrimitive, InPrefix}; use super::base_conv; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs b/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs index 46d7c9682..97ceafe8d 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) floatf inprefix + //! formatter for %f %F common-notation floating-point subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/intf.rs b/src/uu/printf/src/tokenize/num_format/formatters/intf.rs index 5b524897f..489420c41 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/intf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/intf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) fchar conv decr inprefix intf ints finalstr + //! formatter for unsigned and signed int subs //! unsigned ints: %X %x (hex u64) %o (octal u64) %u (base ten u64) //! signed ints: %i %d (both base ten i64) @@ -193,7 +195,7 @@ impl Formatter for Intf { *field.field_char == 'i' || *field.field_char == 'd', inprefix, ); - // We always will have a formatprimitive to return + // We always will have a format primitive to return Some(if convert_hints.len_digits == 0 || convert_hints.is_zero { // if non-digit or end is reached before a non-zero digit let mut fmt_prim: FormatPrimitive = Default::default(); diff --git a/src/uu/printf/src/tokenize/num_format/formatters/mod.rs b/src/uu/printf/src/tokenize/num_format/formatters/mod.rs index f6e2e7389..ccbcdb1e7 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/mod.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/mod.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv cninetyninehexfloatf floatf intf scif + mod base_conv; pub mod cninetyninehexfloatf; pub mod decf; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/scif.rs b/src/uu/printf/src/tokenize/num_format/formatters/scif.rs index f9092d1ca..69a703042 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/scif.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/scif.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix + //! formatter for %e %E scientific notation subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/num_format.rs b/src/uu/printf/src/tokenize/num_format/num_format.rs index 36c95524a..44afd2e66 100644 --- a/src/uu/printf/src/tokenize/num_format/num_format.rs +++ b/src/uu/printf/src/tokenize/num_format/num_format.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety qchar topchar structs fmtr fchar inprefix devs octals cninetyninehexfloatf + //! handles creating printed output for numeric substitutions use std::env; diff --git a/src/uu/printf/src/tokenize/sub.rs b/src/uu/printf/src/tokenize/sub.rs index 925d3adfc..bf3fea211 100644 --- a/src/uu/printf/src/tokenize/sub.rs +++ b/src/uu/printf/src/tokenize/sub.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety + //! Sub is a token that represents a //! segment of the format string that is a substitution //! it is created by Sub's implementation of the Tokenizer trait diff --git a/src/uu/printf/src/tokenize/token.rs b/src/uu/printf/src/tokenize/token.rs index 2e0cdd812..1d8ee5ead 100644 --- a/src/uu/printf/src/tokenize/token.rs +++ b/src/uu/printf/src/tokenize/token.rs @@ -6,7 +6,7 @@ use std::str::Chars; // A token object is an object that can print the expected output // of a contiguous segment of the format string, and -// requires at most 1 argusegment +// requires at most 1 argument pub trait Token { fn print(&self, args: &mut Peekable>); } diff --git a/src/uu/printf/src/tokenize/unescaped_text.rs b/src/uu/printf/src/tokenize/unescaped_text.rs index 06700e2a5..b6fdd1aa1 100644 --- a/src/uu/printf/src/tokenize/unescaped_text.rs +++ b/src/uu/printf/src/tokenize/unescaped_text.rs @@ -3,6 +3,8 @@ //! and escaped character literals (of allowed escapes), //! into an unescaped text byte array +// spell-checker:ignore (ToDO) retval hexchars octals printf's bvec vals coreutil addchar eval bytecode + use itertools::PutBackN; use std::char::from_u32; use std::iter::Peekable; diff --git a/src/uu/ptx/src/ptx.rs b/src/uu/ptx/src/ptx.rs index e333dec5a..5c52c2680 100644 --- a/src/uu/ptx/src/ptx.rs +++ b/src/uu/ptx/src/ptx.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDOs) corasick memchr Roff trunc oset iset + extern crate aho_corasick; extern crate getopts; extern crate memchr; diff --git a/src/uu/readlink/src/readlink.rs b/src/uu/readlink/src/readlink.rs index 5724fc8a6..d81ca8e14 100644 --- a/src/uu/readlink/src/readlink.rs +++ b/src/uu/readlink/src/readlink.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) errno + extern crate getopts; #[macro_use] diff --git a/src/uu/realpath/src/realpath.rs b/src/uu/realpath/src/realpath.rs index c63d995d4..780b7964b 100644 --- a/src/uu/realpath/src/realpath.rs +++ b/src/uu/realpath/src/realpath.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) retcode + extern crate getopts; #[macro_use] diff --git a/src/uu/relpath/src/relpath.rs b/src/uu/relpath/src/relpath.rs index c04918294..f66d7ae41 100644 --- a/src/uu/relpath/src/relpath.rs +++ b/src/uu/relpath/src/relpath.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) subpath absto absfrom absbase + extern crate getopts; #[macro_use] diff --git a/src/uu/rm/src/rm.rs b/src/uu/rm/src/rm.rs index 057ed4307..4b08a5789 100644 --- a/src/uu/rm/src/rm.rs +++ b/src/uu/rm/src/rm.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) bitor ulong + extern crate getopts; extern crate remove_dir_all; extern crate walkdir; diff --git a/src/uu/seq/src/seq.rs b/src/uu/seq/src/seq.rs index d4a93e904..1ca4c8a9b 100644 --- a/src/uu/seq/src/seq.rs +++ b/src/uu/seq/src/seq.rs @@ -1,6 +1,8 @@ // TODO: Make -w flag work with decimals // TODO: Support -f flag +// spell-checker:ignore (ToDO) istr chiter argptr ilen + extern crate getopts; #[macro_use] diff --git a/src/uu/shred/src/shred.rs b/src/uu/shred/src/shred.rs index d6daa13f9..27ba1e1a2 100644 --- a/src/uu/shred/src/shred.rs +++ b/src/uu/shred/src/shred.rs @@ -6,6 +6,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) NAMESET FILESIZE fstab coeff journaling writeback REiser journaled + extern crate getopts; extern crate rand; diff --git a/src/uu/shuf/src/shuf.rs b/src/uu/shuf/src/shuf.rs index 112f42681..6b4a34121 100644 --- a/src/uu/shuf/src/shuf.rs +++ b/src/uu/shuf/src/shuf.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) cmdline evec seps rvec fdata + extern crate getopts; extern crate rand; diff --git a/src/uu/sort/src/sort.rs b/src/uu/sort/src/sort.rs index f83915933..92b91bf29 100644 --- a/src/uu/sort/src/sort.rs +++ b/src/uu/sort/src/sort.rs @@ -6,6 +6,8 @@ // * file that was distributed with this source code. #![allow(dead_code)] +// spell-checker:ignore (ToDO) outfile nondictionary + extern crate getopts; extern crate semver; @@ -523,7 +525,7 @@ fn version_compare(a: &str, b: &str) -> Ordering { fn remove_nondictionary_chars(s: &str) -> String { // Using 'is_ascii_whitespace()' instead of 'is_whitespace()', because it // uses only symbols compatible with UNIX sort (space, tab, newline). - // 'is_whitespace()' uses more symbols as whitespaces (e.g. vertical tab). + // 'is_whitespace()' uses more symbols as whitespace (e.g. vertical tab). s.chars() .filter(|c| c.is_alphanumeric() || c.is_ascii_whitespace()) .collect::() diff --git a/src/uu/split/src/split.rs b/src/uu/split/src/split.rs index f7da22b90..181224f2a 100644 --- a/src/uu/split/src/split.rs +++ b/src/uu/split/src/split.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) PREFIXaa + extern crate getopts; #[macro_use] diff --git a/src/uu/stat/src/fsext.rs b/src/uu/stat/src/fsext.rs index 41e5fecb5..11c8f8095 100644 --- a/src/uu/stat/src/fsext.rs +++ b/src/uu/stat/src/fsext.rs @@ -4,7 +4,8 @@ // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// + +// spell-checker:ignore (ToDO) strerror IFBLK IFCHR IFDIR IFLNK IFIFO IFMT IFREG IFSOCK subsec nanos gnulib statfs Sstatfs bitrig statvfs iosize blksize fnodes fsid namelen bsize bfree bavail ffree frsize namemax errno fstype adfs acfs aufs affs autofs befs bdevfs binfmt ceph cgroups cifs configfs cramfs cgroupfs debugfs devfs devpts ecryptfs btrfs efivarfs exofs fhgfs fuseblk fusectl futexfs gpfs hfsx hostfs hpfs inodefs ibrix inotifyfs isofs jffs logfs hugetlbfs mqueue nsfs ntfs ocfs panfs pipefs ramfs romfs nfsd nilfs pstorefs reiserfs securityfs smackfs snfs sockfs squashfs sysfs sysv tempfs tracefs ubifs usbdevfs vmhgfs tmpfs vxfs wslfs xenfs vzfs openprom overlayfs extern crate time; diff --git a/src/uu/stat/src/stat.rs b/src/uu/stat/src/stat.rs index a23d5201f..af02bbbeb 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. +// spell-checker:ignore (ToDO) mtab fsext showfs otype fmtstr prec ftype blocksize nlink rdev fnodes fsid namelen blksize inodes fstype iosize statfs gnulib NBLOCKSIZE + extern crate getopts; use getopts::Options; diff --git a/src/uu/stat/src/test_stat.rs b/src/uu/stat/src/test_stat.rs index 387cd5e6b..05e91fb84 100644 --- a/src/uu/stat/src/test_stat.rs +++ b/src/uu/stat/src/test_stat.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) scanutil qzxc dqzxc + pub use super::*; #[test] diff --git a/src/uu/stdbuf/build.rs b/src/uu/stdbuf/build.rs index a35d1aaad..c005072d9 100644 --- a/src/uu/stdbuf/build.rs +++ b/src/uu/stdbuf/build.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) dylib libstdbuf deps liblibstdbuf + use std::env; use std::fs; use std::path::Path; diff --git a/src/uu/stdbuf/src/libstdbuf/build.rs b/src/uu/stdbuf/src/libstdbuf/build.rs index a295b4406..95f55ed94 100644 --- a/src/uu/stdbuf/src/libstdbuf/build.rs +++ b/src/uu/stdbuf/src/libstdbuf/build.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) libstdbuf + extern crate cpp_build; use cpp_build::Config; diff --git a/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs b/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs index 3b8423114..094c18ba6 100644 --- a/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs +++ b/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) IOFBF IOLBF IONBF cstdio setvbuf + #[macro_use] extern crate cpp; extern crate libc; diff --git a/src/uu/stdbuf/src/stdbuf.rs b/src/uu/stdbuf/src/stdbuf.rs index 2d1bce2cc..d8b331e54 100644 --- a/src/uu/stdbuf/src/stdbuf.rs +++ b/src/uu/stdbuf/src/stdbuf.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) tempdir dyld dylib dragonflybsd optgrps libstdbuf + extern crate getopts; extern crate tempdir; diff --git a/src/uu/sum/src/sum.rs b/src/uu/sum/src/sum.rs index f5870e09c..9f5afe2d2 100644 --- a/src/uu/sum/src/sum.rs +++ b/src/uu/sum/src/sum.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. +// spell-checker:ignore (ToDO) sysv + extern crate getopts; #[macro_use] diff --git a/src/uu/tac/src/tac.rs b/src/uu/tac/src/tac.rs index 1a9d27494..b833efa2a 100644 --- a/src/uu/tac/src/tac.rs +++ b/src/uu/tac/src/tac.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) sbytes slen + extern crate getopts; #[macro_use] diff --git a/src/uu/tail/src/platform/redox.rs b/src/uu/tail/src/platform/redox.rs index a3a8c5fa0..2c1efd318 100644 --- a/src/uu/tail/src/platform/redox.rs +++ b/src/uu/tail/src/platform/redox.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) ENOSYS EPERM + extern crate syscall; use self::syscall::{Error, ENOSYS, EPERM}; diff --git a/src/uu/tail/src/platform/unix.rs b/src/uu/tail/src/platform/unix.rs index 7f64207f4..bbb1f1965 100644 --- a/src/uu/tail/src/platform/unix.rs +++ b/src/uu/tail/src/platform/unix.rs @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) errno EPERM ENOSYS + extern crate libc; use std::io::Error; diff --git a/src/uu/tail/src/tail.rs b/src/uu/tail/src/tail.rs index 4857a4e19..10b82bd92 100644 --- a/src/uu/tail/src/tail.rs +++ b/src/uu/tail/src/tail.rs @@ -7,6 +7,8 @@ // * file that was distributed with this source code. // * +// spell-checker:ignore (ToDO) seekable seek'd tail'ing ringbuffer ringbuf + extern crate getopts; extern crate libc; diff --git a/src/uu/test/src/test.rs b/src/uu/test/src/test.rs index 7705e9d79..fa0e3bc58 100644 --- a/src/uu/test/src/test.rs +++ b/src/uu/test/src/test.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) retval paren prec subprec cond + extern crate libc; #[cfg(target_os = "redox")] extern crate syscall; diff --git a/src/uu/timeout/src/timeout.rs b/src/uu/timeout/src/timeout.rs index 079f1934c..d307f755b 100644 --- a/src/uu/timeout/src/timeout.rs +++ b/src/uu/timeout/src/timeout.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) tstr sigstr cmdname setpgid + extern crate getopts; extern crate libc; extern crate time; diff --git a/src/uu/touch/src/touch.rs b/src/uu/touch/src/touch.rs index e3205641f..6c1b7c0c9 100644 --- a/src/uu/touch/src/touch.rs +++ b/src/uu/touch/src/touch.rs @@ -6,6 +6,8 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. +// spell-checker:ignore (ToDO) filetime strptime utcoff strs datetime MMDDhhmm + pub extern crate filetime; extern crate getopts; extern crate time; diff --git a/src/uu/tr/src/expand.rs b/src/uu/tr/src/expand.rs index 4a5aa533f..3291d57ae 100644 --- a/src/uu/tr/src/expand.rs +++ b/src/uu/tr/src/expand.rs @@ -7,6 +7,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) allocs slen unesc + use std::char::from_u32; use std::cmp::min; use std::iter::Peekable; diff --git a/src/uu/tr/src/tr.rs b/src/uu/tr/src/tr.rs index dd8f2910f..d8d78a318 100644 --- a/src/uu/tr/src/tr.rs +++ b/src/uu/tr/src/tr.rs @@ -8,6 +8,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) allocs bset dflag cflag sflag tflag + extern crate bit_set; extern crate fnv; extern crate getopts; diff --git a/src/uu/truncate/src/truncate.rs b/src/uu/truncate/src/truncate.rs index 56def1cae..ed34f41c1 100644 --- a/src/uu/truncate/src/truncate.rs +++ b/src/uu/truncate/src/truncate.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) RFILE refsize rfilename fsize tsize + extern crate getopts; #[macro_use] diff --git a/src/uu/tty/src/tty.rs b/src/uu/tty/src/tty.rs index a024756f9..20f64c886 100644 --- a/src/uu/tty/src/tty.rs +++ b/src/uu/tty/src/tty.rs @@ -7,6 +7,8 @@ // * // * Synced with http://lingrok.org/xref/coreutils/src/tty.c +// spell-checker:ignore (ToDO) ttyname filedesc + extern crate getopts; extern crate libc; diff --git a/src/uu/uname/src/uname.rs b/src/uu/uname/src/uname.rs index 92d88a376..f96edd8a5 100644 --- a/src/uu/uname/src/uname.rs +++ b/src/uu/uname/src/uname.rs @@ -8,6 +8,8 @@ // last synced with: uname (GNU coreutils) 8.21 +// spell-checker:ignore (ToDO) nodename kernelname kernelrelease kernelversion sysname hwplatform mnrsv + extern crate clap; extern crate platform_info; #[macro_use] diff --git a/src/uu/unexpand/src/unexpand.rs b/src/uu/unexpand/src/unexpand.rs index 8c731a995..148f8960f 100644 --- a/src/uu/unexpand/src/unexpand.rs +++ b/src/uu/unexpand/src/unexpand.rs @@ -7,6 +7,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) nums aflag uflag scol prevtab amode ctype cwidth nbytes lastcol pctype + extern crate getopts; extern crate unicode_width; diff --git a/src/uu/unlink/src/unlink.rs b/src/uu/unlink/src/unlink.rs index a8e20bacb..2ba716959 100644 --- a/src/uu/unlink/src/unlink.rs +++ b/src/uu/unlink/src/unlink.rs @@ -7,6 +7,8 @@ /* last synced with: unlink (GNU coreutils) 8.21 */ +// spell-checker:ignore (ToDO) lstat IFLNK IFMT IFREG + extern crate getopts; extern crate libc; diff --git a/src/uu/uptime/src/uptime.rs b/src/uu/uptime/src/uptime.rs index 8c58f9a87..eb0329cd0 100644 --- a/src/uu/uptime/src/uptime.rs +++ b/src/uu/uptime/src/uptime.rs @@ -8,6 +8,8 @@ /* last synced with: cat (GNU coreutils) 8.13 */ +// spell-checker:ignore (ToDO) getloadavg upsecs updays nusers loadavg boottime uphours upmins + extern crate chrono; extern crate clap; extern crate time; diff --git a/src/uu/wc/src/wc.rs b/src/uu/wc/src/wc.rs index a088469e9..a7c9cda13 100644 --- a/src/uu/wc/src/wc.rs +++ b/src/uu/wc/src/wc.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) fpath + extern crate getopts; #[macro_use] @@ -128,7 +130,7 @@ const SYN: u8 = 0x16 as u8; const FF: u8 = 0x0C as u8; #[inline(always)] -fn is_word_seperator(byte: u8) -> bool { +fn is_word_separator(byte: u8) -> bool { byte == SPACE || byte == TAB || byte == CR || byte == SYN || byte == FF } @@ -181,7 +183,7 @@ fn wc(files: Vec, settings: &Settings) -> StdResult<(), i32> { current_char_count = line.chars().count(); } Err(..) => { - word_count += raw_line.split(|&x| is_word_seperator(x)).count(); + word_count += raw_line.split(|&x| is_word_separator(x)).count(); current_char_count = raw_line.iter().filter(|c| c.is_ascii()).count() } } @@ -189,7 +191,7 @@ fn wc(files: Vec, settings: &Settings) -> StdResult<(), i32> { if current_char_count > longest_line_length { // we subtract one here because `line.len()` includes the LF - // matches GNU 'wc' behaviour + // matches GNU 'wc' behavior longest_line_length = current_char_count - 1; } } diff --git a/src/uu/who/src/who.rs b/src/uu/who/src/who.rs index 524a6cbc1..47782503b 100644 --- a/src/uu/who/src/who.rs +++ b/src/uu/who/src/who.rs @@ -8,6 +8,8 @@ #![cfg_attr(feature = "clippy", feature(plugin))] #![cfg_attr(feature = "clippy", plugin(clippy))] +// spell-checker:ignore (ToDO) ttyname hostnames runlevel mesg wtmp statted boottime deadprocs initspawn clockchange curr runlvline pidstr exitstr hoststr + #[macro_use] extern crate uucore; use uucore::libc::{ttyname, STDIN_FILENO, S_IWGRP}; diff --git a/src/uu/whoami/src/platform/mod.rs b/src/uu/whoami/src/platform/mod.rs index 12d85ec08..ab0b856e6 100644 --- a/src/uu/whoami/src/platform/mod.rs +++ b/src/uu/whoami/src/platform/mod.rs @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) getusername + #[cfg(unix)] pub use self::unix::getusername; diff --git a/src/uu/whoami/src/platform/unix.rs b/src/uu/whoami/src/platform/unix.rs index 259f806ef..33bfa6025 100644 --- a/src/uu/whoami/src/platform/unix.rs +++ b/src/uu/whoami/src/platform/unix.rs @@ -8,6 +8,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) getusername + use std::io::Result; use uucore::entries::uid2usr; use uucore::libc::geteuid; diff --git a/src/uu/whoami/src/platform/windows.rs b/src/uu/whoami/src/platform/windows.rs index 6ae9027f0..7f9490a76 100644 --- a/src/uu/whoami/src/platform/windows.rs +++ b/src/uu/whoami/src/platform/windows.rs @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) advapi lmcons winnt getusername WCHAR UNLEN + extern crate advapi32; extern crate uucore; extern crate winapi; diff --git a/src/uu/whoami/src/whoami.rs b/src/uu/whoami/src/whoami.rs index 4f995afaa..65b8e73fb 100644 --- a/src/uu/whoami/src/whoami.rs +++ b/src/uu/whoami/src/whoami.rs @@ -7,6 +7,8 @@ /* last synced with: whoami (GNU coreutils) 8.21 */ +// spell-checker:ignore (ToDO) getusername + #[macro_use] extern crate clap; #[macro_use] diff --git a/util/test-repo-whitespace.BAT b/util/test-repo-whitespace.BAT index 86fd369a5..c63415295 100644 --- a/util/test-repo-whitespace.BAT +++ b/util/test-repo-whitespace.BAT @@ -8,8 +8,8 @@ :: License: MIT/Apache-2.0 (see https://opensource.org/licenses/Apache-2.0 , https://opensource.org/licenses/MIT) :: * this software is provided for free, WITHOUT ANY EXPRESS OR IMPLIED WARRANTY (see the license for details) +:: spell-checker:ignore (ignore) CTYPE POSIX RETval RETvar akefile makefile makefiles multiline :: spell-checker:ignore (shell/cmd) COMSPEC ERRORLEVEL -:: spell-checker:ignore () CTYPE POSIX Tval Tvar akefile makefile makefiles multiline :config set "_exclude_dir=(?i)[_.#]build|[.]git|[.]gpg|[.]vs|fixtures|vendor"