flow icon indicating copy to clipboard operation
flow copied to clipboard

CLI allow to display only errors/warnings instead of warnings + errors

Open SimonGodefroid opened this issue 4 years ago • 1 comments

Proposal

Make a CLI option to list only errors or only warnings.

npx flow --show-only-errors => this would be a --show-all-errors but without the warnings

npx flow --show-only-warnings => this would be a --show-all-errors but with errors instead of warnings

Use case

I am migrating from 0.133.0 to 0.151.0, needless to say I have a lot of warnings and errors.

However I can live with warnings for now and am just trying to fix errors first.

If I run

npx flow

I see errors + warnings.

I can run

npx flow --show-all-errors

It's annoying not to be able to fix each kind separately.

Thanks for considering.

SimonGodefroid avatar May 26 '21 12:05 SimonGodefroid

For anyone else reading; here is what I do as a workaround:

(flow --show-all-errors --color=always | sed '/Warning ---/q') 2> /dev/null

yanndinendal avatar May 26 '21 13:05 yanndinendal