Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flag: add parsing mode that turn flag match errors into no_match instead #22191

Merged

Conversation

larpon
Copy link
Contributor

@larpon larpon commented Sep 10, 2024

This PR adds a parsing mode for FlagMapper that makes it easier to identify what flags the FlagMapper would otherwise error on.

@larpon
Copy link
Contributor Author

larpon commented Sep 10, 2024

An alternative name for the mode I considered was .relaxed or .passthru since it relaxes/passes thrugh specific errors, that may be a shorter/better name for the mode 🤷

@larpon larpon changed the title flag: add parsing mode that turn errors into no_match instead flag: add parsing mode that turn flag match errors into no_match instead Sep 10, 2024
@spytheman
Copy link
Member

An alternative is allow_non_matching, but it is a lot longer.

relaxed is more mnemonic and shorter.

In my opinion, relaxed is more ergonomic overall, and contrasts well with the default strict mode.

@larpon
Copy link
Contributor Author

larpon commented Sep 10, 2024

An alternative is allow_non_matching, but it is a lot longer.

relaxed is more mnemonic and shorter.

In my opinion, relaxed is more ergonomic overall, and contrasts well with the default strict mode.

You are right. Let me change to that

@spytheman
Copy link
Member

passthru has too many consonants and a double s, which will make it prone to typos.

@larpon
Copy link
Contributor Author

larpon commented Sep 10, 2024

Renamed in 21fe88a

@spytheman spytheman merged commit d27ab09 into vlang:master Sep 10, 2024
63 checks passed
@larpon larpon deleted the flag/add-error-as-no-match-parsing-mode branch September 10, 2024 14:18
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