wp-cli / doctor-command

Diagnose problems within WordPress by running a series of checks for symptoms
MIT License
146 stars 22 forks source link

error only spotlight option #172

Closed joeldcanfield closed 4 months ago

joeldcanfield commented 1 year ago

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.

schlessera commented 1 year ago

"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?

joeldcanfield commented 1 year ago

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 commented 1 year ago

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

joeldcanfield commented 1 year ago

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

ernilambar commented 6 months ago

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?

joeldcanfield commented 6 months ago

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".

ernilambar commented 6 months ago

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

joeldcanfield commented 6 months ago

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