-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improvements to the check
command.
#18
Conversation
This commit contains the following improvements: * use `wdl-analysis` for the `check` command that will perform a full static-analysis on the specified file or directory. * add a progress bar to display for the `check` command. * use `clap-verbosity-flag` for the `quiet` and `verbose` flags; this has the advantage of being error level by default and each `-v` specified drops the log level down by one; this gives a little more control over the previous implementation that supported either info (default), debug (-v), or error (-q). * we now colorize the `error` part of handling errors from command execution, displaying the full context of the error, and exiting with status code 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty awesome. Going to checkout the branch and play around, kick some tires, then will come back and approve or share any found issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few thoughts from playing around with these changes.
sprocket lint
is now "behind"sprocket check
, in that it doesn't have all the shnazzy new features you added. Can we move that logic so that it's shared by both commands?- I do have an issue with the progress bar, and it's that
sprocket
is too dang fast! The progress bar is up for like less than a second even when I'm processing my largest test repos. I wonder what the progress bar is actually adding to the experience. - Can we get a
--deny-notes
in addition to--deny-warnings
? This is useful for CI where you want the strictest setting possible
Ah another tweak I'd like to see, but can maybe wait till another PR. IMO a screen full of diagnostics would be easier to make sense of if there was some additional break between files. Maybe just like 3 blank lines in a row? Or maybe a row of |
I intentionally didn't migrate the
Indeed, when I run it on We could perhaps only display the progress bar if there's been some elapsed time (say, a few seconds), that way we don't always show it in a blink such that it's not adding anything to the UX.
That seems reasonable, I can add that.
Adding some additional line breaks or other marker seems like an easy enough thing to add to the UX; I'll tinker with that. |
Ah that makes much more sense! I have a few thoughts though:
Good idea. I think gating the progress bar behind a 2 second delay sounds pretty perfect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit also exposes the commands as part of the `sprocket` crate from which `main.rs` will use.
This commit contains the following improvements:
wdl-analysis
for thecheck
command that will perform a full static-analysis on the specified file or directory.check
command.clap-verbosity-flag
for thequiet
andverbose
flags; this has the advantage of being error level by default and each-v
specified drops the log level down by one; this gives a little more control over the previous implementation that supported either info (default), debug (-v), or error (-q).error
part of handling errors from command execution, displaying the full context of the error, and exiting with status code 1.Before submitting this PR, please make sure: