swift-argument-parser icon indicating copy to clipboard operation
swift-argument-parser copied to clipboard

Document how to provide memberwise initializers for Parsable* types

Open natecook1000 opened this issue 5 years ago • 0 comments

As pointed out in #120, there isn't any documentation describing how to manually create instances of ParsableArguments or ParsableCommand types, and the error message when using one created from calling the default init (e.g. let command = MyCommand()) indicates that the only way to create one is through parsing.

Instead, the Manual Parsing and Testing guide should cover adding a memberwise init as a way to create testable instances of the type, and the error should be updated to indicate that possibility.

natecook1000 avatar Apr 22 '20 19:04 natecook1000