-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/analyze: use exit status 1 and 2 for errors, improve error messag…
…es for invalid cli arguments (#967) * cli usability improvements for cmd/analyze (print errors for missing flags, exit codes) Signed-off-by: Max Fisher <[email protected]> * use exit code 2 for user errors and store exit codes in variables Signed-off-by: Max Fisher <[email protected]> * introduce usage error type and function and simplify exit codes to 0 or 1 Signed-off-by: Max Fisher <[email protected]> * print different message depending on whether the error was a usage error or not, streamline error message for invalid feature flag Signed-off-by: Max Fisher <[email protected]> * exit(2) on user error, use %q to quote strings, improve formatting of available ecosystems in usage text Signed-off-by: Max Fisher <[email protected]> --------- Signed-off-by: Max Fisher <[email protected]>
- Loading branch information
1 parent
f14994f
commit 1740a95
Showing
2 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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