doctor-command icon indicating copy to clipboard operation
doctor-command copied to clipboard

error only spotlight option

Open joeldcanfield opened this issue 3 years ago • 8 comments

Would like an option to spotlight only errors, and not include warnings.

For myself, warnings are essentially meaningless. "Almost broken" doesn't warrant my attention.

joeldcanfield avatar Dec 16 '22 19:12 joeldcanfield

"Almost broken" doesn't warrant my attention. 😆

Yes, It makes sense to add a --spotlight flag. Are you open to providing a PR for this?

schlessera avatar Jan 24 '23 16:01 schlessera

Beyond my ability. Wish I could; we're operating just outside my wheelhouse here and I'd love to expand said wheelhouse. (Brain issues slowing me down, hopefully temporarily.)

joeldcanfield avatar Jan 24 '23 16:01 joeldcanfield

Arg. Please ignore that. I will return and reply more clearly and possibly even correctly.

joeldcanfield avatar Jan 24 '23 17:01 joeldcanfield

I won't be able to make this happen (health issues.)

joeldcanfield avatar Jan 30 '23 18:01 joeldcanfield

Looks like we already have --spotlight argument which displays error and warning. Ref: https://github.com/wp-cli/doctor-command/pull/38

Is this enough or should we introduce new flag for error only?

ernilambar avatar May 27 '24 05:05 ernilambar

for my purposes an error-only flag would be helfpul; I'd like to prevent scraping and scrapping pointless warnings in my results. as mentioned above, "almost broken" has no value in my use of the tool, only "all the way broken".

joeldcanfield avatar May 27 '24 06:05 joeldcanfield

Rather than adding new flag for showing errors only, I have added argument to filter by status, like --status=error or --status=warning. This approach is what we have used in several WP CLI commands. PR - https://github.com/wp-cli/doctor-command/pull/188

ernilambar avatar May 28 '24 07:05 ernilambar

matching existing code is perfect. excellent. thanks very much.

joeldcanfield avatar May 28 '24 16:05 joeldcanfield