Skip to content

fix(lexarg): Iterate on the design#81

Merged
epage merged 35 commits intoassert-rs:mainfrom
epage:lex
Mar 27, 2025
Merged

fix(lexarg): Iterate on the design#81
epage merged 35 commits intoassert-rs:mainfrom
epage:lex

Conversation

@epage
Copy link
Copy Markdown
Collaborator

@epage epage commented Mar 27, 2025

In re-familiaizing myself with the code, I'm starting with the bottom: the CLI parser.

This is a first pass for doing some clean up, trying to focus on the core of what is needed or not needed. Some more passes will be needed.

Comment thread crates/lexarg-error/examples/hello-error.rs Fixed
Comment thread crates/lexarg-error/examples/hello-error.rs Fixed
Comment thread crates/lexarg-error/src/lib.rs Fixed
Comment thread crates/lexarg-error/src/lib.rs Fixed
Comment thread crates/lexarg-error/src/lib.rs Fixed
Comment thread crates/lexarg/src/lib.rs Fixed
Comment thread crates/lexarg/src/lib.rs Fixed
Comment thread crates/lexarg/src/lib.rs Fixed
Comment thread crates/lexarg/src/lib.rs Fixed
Comment thread crates/lexarg/src/lib.rs Fixed
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 27, 2025

Pull Request Test Coverage Report for Build 14110839856

Details

  • 40 of 91 (43.96%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.2%) to 29.29%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/libtest-lexarg/src/lib.rs 0 3 0.0%
crates/libtest2-harness/src/harness.rs 0 4 0.0%
crates/lexarg/src/lib.rs 40 50 80.0%
crates/lexarg-error/src/lib.rs 0 34 0.0%
Totals Coverage Status
Change from base Build 13682271765: -1.2%
Covered Lines: 326
Relevant Lines: 1113

💛 - Coveralls

epage added 21 commits March 27, 2025 10:36
Unsure why I made this deviation for lexopt
From lexopt

> If we find "-=[...]" we interpret it as an option.
> If we find "-o=..." then there's an unexpected value.
> ('-=' as an option exists, see https://linux.die.net/man/1/a2ps.)
> clap always interprets it as a short flag in this case, but
> that feels sloppy.

If `=` is a short in one position, it makes sense for it to be a short
in another position, so we're "being sloppy".
This provides span information and allows users to do more custom logic
with this.
@epage epage merged commit fce1950 into assert-rs:main Mar 27, 2025
16 of 17 checks passed
@epage epage deleted the lex branch March 27, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants