Skip to content

Call validate() only once when parsing via ParsableArguments.parse(_:) - #970

Merged
natecook1000 merged 1 commit into
mainfrom
fix/validate-called-twice
Sep 16, 2026
Merged

natecook1000 merged 1 commit into
mainfrom
fix/validate-called-twice

Conversation

@natecook1000

Copy link
Copy Markdown
Member

The implementation of this parsing point was re-calling the validate() method after parsing had completed, but validate() was already called within the parsing. This eliminates the extra call and adds a test to verify that validate() is only being called once regardless of entry point.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@natecook1000
natecook1000 enabled auto-merge (squash) September 16, 2026 20:47
@natecook1000
natecook1000 force-pushed the fix/validate-called-twice branch from 7654379 to 953b013 Compare September 16, 2026 21:31
The implementation of this parsing point was re-calling the validate()
method after parsing had completed, but validate() was already called
within the parsing. This eliminates the extra call and adds a test to
verify that validate() is only being called once regardless of entry
point.
@natecook1000
natecook1000 force-pushed the fix/validate-called-twice branch from 953b013 to 7bd1de6 Compare September 16, 2026 21:32
@natecook1000
natecook1000 merged commit cdc5f0c into main Sep 16, 2026
37 checks passed
@natecook1000
natecook1000 deleted the fix/validate-called-twice branch September 16, 2026 21:47
@natecook1000
natecook1000 restored the fix/validate-called-twice branch October 5, 2026 02:46
@natecook1000
natecook1000 deleted the fix/validate-called-twice branch October 5, 2026 02:58
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