Conversation
This commit adds the select command to the CLI. This command is used to print out the shapes in a model that match a selector, including the ability to print out a JSON document containing the shape and the variables captured when the shape was matched. Several commands and bits of functionality were cleaned up to make it easier to control writing things like validation to stderr or stdout. When using the select command, only the matched shapes or JSON output should be written to stdout, whereas validation info should be written to stderr. This commit also better organizes the output of --help so that arguments available to all commands and that aren't as important as command-specific arguments are shown at the end of the argument list rather than the beginning.
kstich
approved these changes
May 11, 2020
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds the select command to the CLI. This command is used to
print out the shapes in a model that match a selector, including the
ability to print out a JSON document containing the shape and the
variables captured when the shape was matched.
Several commands and bits of functionality were cleaned up to make it
easier to control writing things like validation to stderr or stdout.
When using the select command, only the matched shapes or JSON output
should be written to stdout, whereas validation info should be written
to stderr.
This commit also better organizes the output of --help so that arguments
available to all commands and that aren't as important as
command-specific arguments are shown at the end of the argument list
rather than the beginning.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.