Skip to content

replace multi-char single-dash flags with -- long options#91

Open
thetic wants to merge 6 commits into
mainfrom
conventional-cli-flags
Open

replace multi-char single-dash flags with -- long options#91
thetic wants to merge 6 commits into
mainfrom
conventional-cli-flags

Conversation

@thetic
Copy link
Copy Markdown
Owner

@thetic thetic commented Apr 25, 2026

Description

POSIX convention reserves single-dash flags for single letters (optionally followed by an argument). All multi-character short flags were replaced with -- long options:

Old New
-lg --list-groups
-ln --list-tests
-ll --list-locations
-lo --list-ordered-locations
-lgl --list-group-locations
-rs --run-skipped
-sg --exact-group
-sn --exact-name
-st --exact-test
-xg --exclude-group
-xn --exclude-name
-xt --exclude-test
-xsg --exclude-exact-group
-xsn --exclude-exact-name
-xst --exclude-exact-test

-vv is retained as-is. Single-letter flags (-g, -n, -t, -v, -c, -b, -r, -s, -f, -e, -h) are unchanged.

Long options accept both --flag value and --flag=value forms.

Related Issues

Fixes # (issue number)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Manual Verification (Optional)

N/A — covered by existing test suite (53/53 pass).

Checklist

  • I have written/updated documentation in docs/ for any user-facing changes.
  • My code follows the project's naming conventions (mu::tiny namespace, INCLUDED_MU_TINY_ guards, mutiny_ C-prefix).
  • For new features, I have considered if a C-interface adapter (.h and .c.cpp) is required for parity.
  • I have reviewed the CONTRIBUTING.md file to ensure compliance with architectural guidelines.

POSIX convention reserves single-dash flags for single letters. All
multi-character short flags (-lg, -ln, -ll, -lo, -lgl, -rs, -sg, -sn,
-st, -xg, -xn, -xsg, -xsn, -xt, -xst) are replaced with -- long
options (--list-groups, --list-tests, etc.). Long options accept both
"--flag value" and "--flag=value" forms. -vv is retained as-is.

The cmake discovery script and its tests are updated to use the new flags.
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 25, 2026

Coverage Status

coverage: 98.933% (+0.007%) from 98.926% — conventional-cli-flags into main

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 25, 2026

TestsPassed ✅Skipped ⚠️Failed
JUnit Tests1086 ran1077 passed9 skipped0 failed

thetic added 2 commits April 25, 2026 14:59
Every remaining short flag now has a --long-option equivalent:
  -h → --help
  -v → --verbose / --verbose=1
  -vv → --verbose=2
  -c → --color
  -b → --reverse
  -f → --crash-on-fail
  -e → --no-rethrow
  -g → --group
  -n → --name
  -t → --test
  -r → --repeat (also --repeat=N)
  -s → --shuffle (also --shuffle=N)

--verbose=2 activates very-verbose mode; --verbose=3 or higher is an
error.  All long options accept both "flag value" and "flag=value" forms
where applicable.
@thetic thetic force-pushed the conventional-cli-flags branch from 80ea7f0 to 4f771f0 Compare April 25, 2026 22:02
thetic added 3 commits April 25, 2026 15:03
Prints "mutiny v<version>" and exits 0, following POSIX convention.
Covers the return-0 path, version string in output, and tests-not-run.
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.

2 participants