Skip to content

feat(parser): add --flag=value syntax and unknown flag handling#128

Merged
napalu merged 9 commits into
mainfrom
feature/equals-syntax-and-unknown-flags
Nov 9, 2025
Merged

feat(parser): add --flag=value syntax and unknown flag handling#128
napalu merged 9 commits into
mainfrom
feature/equals-syntax-and-unknown-flags

Conversation

@napalu
Copy link
Copy Markdown
Owner

@napalu napalu commented Nov 6, 2025

  • Support standard --flag=value and -f=value formats for all flag types
  • Preserve internal '=' signs in values (URLs, env vars, JSON, etc.)
  • Add config options to allow or treat unknown flags as positionals
  • Fix i18n code generation bugs and key normalization
  • Update and extend tests (34 new cases, fuzz coverage)

Co-developed with Claude (AI-assisted)

- Support standard --flag=value and -f=value formats for all flag types
- Preserve internal '=' signs in values (URLs, env vars, JSON, etc.)
- Add config options to allow or treat unknown flags as positionals
- Fix i18n code generation bugs and key normalization
- Update and extend tests (34 new cases, fuzz coverage)

Co-developed with Claude (AI-assisted)
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 66.82028% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.93%. Comparing base (1970cca) to head (5f77ebb).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
v2/goopt_internal.go 49.19% 48 Missing and 15 partials ⚠️
v2/goopt.go 82.35% 4 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
+ Coverage   79.29%   79.93%   +0.63%     
==========================================
  Files          88       88              
  Lines       16562    13190    -3372     
==========================================
- Hits        13133    10543    -2590     
+ Misses       2725     1924     -801     
- Partials      704      723      +19     
Flag Coverage Δ
v1 74.74% <100.00%> (+1.82%) ⬆️
v2 82.82% <66.66%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
goopt.go 74.03% <100.00%> (+1.80%) ⬆️
v2/goopt_internal_positionals.go 97.08% <100.00%> (+0.44%) ⬆️
v2/i18n/bundle.go 72.69% <100.00%> (+0.90%) ⬆️
v2/parser_config_funcs.go 94.92% <100.00%> (+3.16%) ⬆️
v2/renderer.go 99.09% <100.00%> (+2.08%) ⬆️
v2/goopt.go 87.65% <82.35%> (+0.54%) ⬆️
v2/goopt_internal.go 75.01% <49.19%> (-0.79%) ⬇️

... and 79 files with indirect coverage changes

Files with missing lines Coverage Δ
goopt.go 74.03% <100.00%> (+1.80%) ⬆️
v2/goopt_internal_positionals.go 97.08% <100.00%> (+0.44%) ⬆️
v2/i18n/bundle.go 72.69% <100.00%> (+0.90%) ⬆️
v2/parser_config_funcs.go 94.92% <100.00%> (+3.16%) ⬆️
v2/renderer.go 99.09% <100.00%> (+2.08%) ⬆️
v2/goopt.go 87.65% <82.35%> (+0.54%) ⬆️
v2/goopt_internal.go 75.01% <49.19%> (-0.79%) ⬇️

... and 79 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@napalu napalu merged commit 4e66b4d into main Nov 9, 2025
12 of 13 checks passed
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.

1 participant