Commit graph

6155 commits

Author SHA1 Message Date
Roy Ivy III
ae05bffbab docs/spell ~ add 'vendor' directory exception for spell-checker 2021-11-19 18:04:55 -06:00
Roy Ivy III
7784a252f2 fix/yes ~ revise to match 'nix' changes 2021-11-19 18:04:53 -06:00
Roy Ivy III
7834d9ffaf update Cargo.lock 2021-11-19 17:55:03 -06:00
Roy Ivy III
03e0cbb020 update 'nix' within workspace to force patched version 2021-11-19 17:55:03 -06:00
Roy Ivy III
8b7f2b44f6 change ~ use patched/vendor'ed 'nix' crate until fixed at source
- a PR has been submitted to 'nix'; ref: <https://github.com/nix-rust/nix/pull/1590>
2021-11-19 17:55:02 -06:00
Roy Ivy III
39a6e6c75b maint/CICD ~ (GHA) normalize setup sub-step ordering 2021-11-19 17:55:02 -06:00
Roy Ivy III
f07a1749a1 fix spell-check errors 2021-11-19 17:55:02 -06:00
Roy Ivy III
7133efd0a5 tests ~ fix cargo clippy complaint (clippy::needless_return) 2021-11-19 17:55:02 -06:00
Roy Ivy III
047c17dd31 maint/CICD - (GHA) standardize job step ordering (install, vars, prereq, toolchain, ...) 2021-11-19 17:55:02 -06:00
Roy Ivy III
0b10e69f56 maint/CICD ~ (GHA) repair broken cspell by pinning it to version v4.2.8
## [why]

`cspell` in CI started mysteriously failing mid-2021. Tracking down the
error took some time as it was not obvious from `cspell` feedback where
the issue lay. Ultimately, it was discovered that `cspell` had deprecated
use on NodeJS versions < v12 for `cspell` v5+.

`cspell` is now pinned to v4.2.8, with a maintenance note to allow an
upgrade to the `cspell` version when a version of NodeJS >= v12 is being
used in the CI.

An issue requesting better tool feedback for similar situations was also
opened on the `cspell` repo.[*]

[*]: [🙏🏻 Add warning (or error) when used on deprecated/outdated JS platform versions](https://github.com/streetsidesoftware/cspell/issues/1984)
2021-11-19 17:55:02 -06:00
Roy Ivy III
aba1c8f596 maint/CICD ~ (GHA) disable tool cache use for 'action-rs/install'
# [why]

The tool cache is currently failing and seems to be getting further behind current
versions. The [actions-rs/install#12] issue addresses this but seems to be
languishing without any proposed solution.

[ref]: <actions-rs/install#12>
2021-11-19 17:55:02 -06:00
Roy Ivy III
f20aa49821 maint/CICD ~ (GHA) fix cargo-udeps false positives (add 'ignore' exceptions to sub-crates) 2021-11-19 17:55:02 -06:00
Roy Ivy III
12419b3ee2 maint/CICD ~ (GHA) reform 'unused dependency check' (cargo udeps ...) into a style warning 2021-11-19 17:55:02 -06:00
Roy Ivy III
a6635d62c7 maint/CICD ~ (GHA) use 'feat_os_unix' consistently for ubuntu jobs 2021-11-19 17:55:01 -06:00
Roy Ivy III
37a3c68f3a maint/CICD ~ (GHA) add style fault configurability (fail vs warn)
- add individual job-step control for 'style' step faults (build failure vs only a warning)
2021-11-19 17:55:01 -06:00
Roy Ivy III
c951806e70 maint/CICD ~ (GHA) fix cargo clippy lint
- fixes conversion of new `cargo clippy` output style to GHA annotations

## [why]

`cargo clippy` output formatting changed, using relative instead of absolute paths.
2021-11-19 17:55:01 -06:00
Roy Ivy III
36c6ccde0d maint/dev ~ prefer less visible tool configuration files 2021-11-19 17:55:01 -06:00
Sylvestre Ledru
6c6e047453
Merge pull request #2586 from Funky185540/docs/document-macros
macros: Add documentation with examples to macros
2021-11-19 21:50:38 +01:00
Sylvestre Ledru
76b7f618f0
Merge pull request #2748 from sylvestre/codecov
remove some unused codecov declarations
2021-11-19 21:43:44 +01:00
Sylvestre Ledru
43bdcaf212
Merge pull request #2532 from hbina/hbina-rm-silently-accept-presume-input-tty
Silently accepts ---presume-input-tty
2021-11-19 21:42:41 +01:00
Sylvestre Ledru
b4416abc82
Merge pull request #2743 from thomasqueirozb/who_uresult
who: use UResult
2021-11-19 21:41:14 +01:00
Sylvestre Ledru
01440734a4
Merge pull request #2735 from thomasqueirozb/printenv_env_compat
env+printenv: use UResult + improve compatibility
2021-11-19 21:39:34 +01:00
Sylvestre Ledru
da69ab19db
Merge pull request #2745 from thomasqueirozb/chmod_uresult
chmod: use UResult
2021-11-19 21:38:31 +01:00
Smicry
fc851e036b
Implement tail -<number> (#2747)
And add obsolete_syntax test
2021-11-19 21:37:47 +01:00
Sylvestre Ledru
c0af58881e remove some unused codecov declarations 2021-11-16 10:10:30 +01:00
Sylvestre Ledru
00769af807
Merge pull request #2746 from rivy/fix.factor
fix/factor ~ minor repairs to docs and tests
2021-11-15 08:15:21 +01:00
Roy Ivy III
363453f5e4 tests ~ (factor) refactor divisor() to return quickcheck::TestResult
- return standard quickcheck results
- drop `a == 0 && b == 0` from test domain via TestResult::discard()
- avoid divide by zero panics
- ref: #1589
2021-11-13 14:18:23 -06:00
Roy Ivy III
740d8e9bc5 docs/factor ~ (BENCHMARKING.md) fix formatting, returning missing newlines 2021-11-13 11:07:02 -06:00
Thomas Queiroz
fed596a23b
tests/chmod: change normal error to usage error 2021-11-12 19:07:37 -03:00
Thomas Queiroz
670ed6324b
chmod: use UResult 2021-11-12 18:29:08 -03:00
Sylvestre Ledru
ca1156458e
Merge pull request #2714 from blyxxyz/os_display-crate
Move display::Quotable into its own crate
2021-11-12 21:17:59 +01:00
Sylvestre Ledru
177374aa5a
Merge pull request #2740 from jfinkels/seq-inf-width-spaces
seq: correct fixed-width spacing for inf sequences
2021-11-12 21:16:40 +01:00
Sylvestre Ledru
9f60f4d0dc
Merge pull request #2742 from thomasqueirozb/usage_error
Add CmdResult::usage_error
2021-11-12 21:15:07 +01:00
Sylvestre Ledru
7f3c46ca43
Merge pull request #2744 from nbraud/factor/deps
factor: Update to current versions of `smallvec`
2021-11-10 19:37:16 +01:00
nicoo
bed45602a7 factor/Cargo.toml: Document feature pending a MinRustV bump 2021-11-10 15:26:36 +01:00
nicoo
32b0178a72 factor: Update to current versions of smallvec
smallvec 1.0 and later wasn't compatible with Rust 1.33 but the
minimum supported Rust version for coreutils moved on.
2021-11-10 15:12:37 +01:00
Thomas Queiroz
cbe6d7d5c1
who: use UResult 2021-11-09 20:00:34 -03:00
Thomas Queiroz
235152a6b7
uucore/utmpx: remove unwrap in cannon_host
Default to hostname if getaddrinfo fails
2021-11-09 20:00:34 -03:00
Thomas Queiroz
c9624725ab
tests: use CmdResult::usage_error 2021-11-09 17:37:05 -03:00
Thomas Queiroz
f43dfa9a61
tests/common: implement CmdResult::usage_error 2021-11-09 16:36:03 -03:00
Thomas Queiroz
0bbc805e43
tests/common: add util_name+bin_path to CmdResult 2021-11-09 16:36:03 -03:00
Thomas Queiroz
ab4573bde9
tests/common: create TestScenario::composite_cmd
This is made to call UCommand::new with Some(util_name)
2021-11-09 16:35:38 -03:00
Thomas Queiroz
d4ca4371d7
tests/common: add util_name+bin_path to UCommand 2021-11-09 04:04:56 -03:00
Thomas Queiroz
fc300dda24
tests/common: UCommand::new rename arg to bin_path
Merge and remove unecessary `.as_ref()`
2021-11-09 00:12:11 -03:00
Jeffrey Finkelstein
0b86afa858 seq: correct fixed-width spacing for inf sequences
Pad infinity and negative infinity values with spaces when using the
`-w` option to `seq`. This corrects the behavior of `seq` to match that
of the GNU version:

    $ seq -w 1.000 inf inf | head -n 4
    1.000
      inf
      inf
      inf

Previously, it incorrectly padded with 0s instead of spaces.
2021-11-08 20:12:54 -05:00
Jan Verbeek
77e1570ea0 Move display::Quotable into its own crate
The standalone version has a number of bugfixes compared to the old
version.
2021-11-08 23:07:40 +01:00
Thomas Queiroz
124f929848
tests/env: change Windows test_change_directory
Invoke `cmd.exe /C cd` to determine the current working directory instead of relying on the output of
environment variables.
2021-11-07 23:11:39 -03:00
jfinkels
2e12316ae1
seq: use BigDecimal to represent floats (#2698)
* seq: use BigDecimal to represent floats

Use `BigDecimal` to represent arbitrary precision floats in order to
prevent numerical precision issues when iterating over a sequence of
numbers. This commit makes several changes at once to accomplish this
goal.

First, it creates a new struct, `PreciseNumber`, that is responsible for
storing not only the number itself but also the number of digits (both
integer and decimal) needed to display it. This information is collected
at the time of parsing the number, which lives in the new
`numberparse.rs` module.

Second, it uses the `BigDecimal` struct to store arbitrary precision
floating point numbers instead of the previous `f64` primitive
type. This protects against issues of numerical precision when
repeatedly accumulating a very small increment.

Third, since neither the `BigDecimal` nor `BigInt` types have a
representation of infinity, minus infinity, minus zero, or NaN, we add
the `ExtendedBigDecimal` and `ExtendedBigInt` enumerations which extend
the basic types with these concepts.

* fixup! seq: use BigDecimal to represent floats

* fixup! seq: use BigDecimal to represent floats

* fixup! seq: use BigDecimal to represent floats

* fixup! seq: use BigDecimal to represent floats

* fixup! seq: use BigDecimal to represent floats
2021-11-06 15:44:42 +01:00
Michael Debertol
a7aa6b8e3a
Merge pull request #2738 from equal-l2/ls-fix-color-comp
ls: add possible value for `--color=`
2021-11-05 21:04:05 +01:00
equal-l2
cda3d5a29b ls: add possible value for --color= 2021-11-06 03:42:27 +09:00