Issue 18016: Add infos count to oc status#18422
Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom Feb 5, 2018
Merged
Issue 18016: Add infos count to oc status#18422openshift-merge-robot merged 1 commit intoopenshift:masterfrom
oc status#18422openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
Contributor
Author
|
/assign @enj |
oc statusoc status
juanvallejo
reviewed
Feb 5, 2018
| fmt.Fprintf(out, "%s identified, use '%[2]s status -v' to see details.\n", warnings, d.CommandBaseName) | ||
| switch { | ||
| case !d.Suggest && ((len(errorMarkers) > 0 && errorSuggestions > 0) || len(warningMarkers) > 0 || len(infoMarkers) > 0): | ||
| fmt.Fprintf(out, "%s identified, use '%s status -v' to see details.\n", markerString, d.CommandBaseName) |
Contributor
There was a problem hiding this comment.
I don't see where the count for each of these is printed.
EDIT: nevermind, see it now. Mind having a separate branch for a single info above?
if len(infoMarkers) == 1 {
...
} else if len(infoMarkers) > 1
Contributor
Author
There was a problem hiding this comment.
Sure, I wasn't sure if it grammatically made more sense to have, eg, "2 infos identified" vs "2 info identified"
Now `oc status` without `-v` will show a count for number of errors, warnings, and info identified. Also refactored this output to reduce redundant switch statements with including infos.
Contributor
Author
|
/retest |
Contributor
|
Changes look good to me |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: damemi, soltysh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Contributor
|
Automatic merge from submit-queue. |
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.
Fix for #18016
Now
oc statuswithout-vwill show a count for number of errors, warnings, and info identified. Also refactored this output to reduce redundant switch statements with including infos.