Skip to content

Fix flag parser to handle negative numbers#158

Open
SwloBr wants to merge 1 commit into
Revxrsal:v4from
Projeto-Kaizen:fix/flag-parser-block-negative-numbers
Open

Fix flag parser to handle negative numbers#158
SwloBr wants to merge 1 commit into
Revxrsal:v4from
Projeto-Kaizen:fix/flag-parser-block-negative-numbers

Conversation

@SwloBr

@SwloBr SwloBr commented Apr 10, 2026

Copy link
Copy Markdown

This pull request refines the parsing logic for short flag formats in the FlagParser class. The main improvement ensures that short flags which are actually numbers (e.g., -1, -.5) are not incorrectly interpreted as flag groups.

Flag parsing improvements:

  • Updated the short flag parsing in FlagParser.java to check if the flag after the dash is a digit or a dot, and if so, treats it as a value rather than a group of flags. This prevents misparsing numeric arguments as flag groups.

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