Skip to content

[red-knot] Add verbosity argument to CLI#12404

Merged
MichaReiser merged 3 commits intomainfrom
red-knot-cli-verbosity
Jul 19, 2024
Merged

[red-knot] Add verbosity argument to CLI#12404
MichaReiser merged 3 commits intomainfrom
red-knot-cli-verbosity

Conversation

@MichaReiser
Copy link
Copy Markdown
Member

Summary

This PR adds a new --verbose and -v, -vv and -vvv options and uses the level to configure the tracing verbosity.

Test Plan

I ran red knot with the different settings and verified that traces appear according to that level.

@MichaReiser MichaReiser force-pushed the red-knot-cli-verbosity branch from dd4ca90 to 3ab6712 Compare July 19, 2024 10:36
@MichaReiser MichaReiser added the ty Multi-file analysis & type inference label Jul 19, 2024
@MichaReiser MichaReiser marked this pull request as ready for review July 19, 2024 10:37
@MichaReiser MichaReiser force-pushed the red-knot-cli-verbosity branch from 3ab6712 to 3bd767a Compare July 19, 2024 10:42
orchestrator_sender: crossbeam_channel::Sender<OrchestratorMessage>,
main_loop_receiver: crossbeam_channel::Receiver<MainLoopMessage>,
verbosity: Option<VerbosityLevel>,
orchestrator: crossbeam_channel::Sender<OrchestratorMessage>,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the renames but clippy became very angry at me and told me that the old name was a bad name.

@AlexWaygood
Copy link
Copy Markdown
Member

It looks a litle odd right now that --verbose is the only CLI option that doesn't have a description when you run --help:

image

Comment thread crates/red_knot/src/cli/verbosity.rs
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 19, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Comment thread crates/red_knot/src/cli/verbosity.rs Outdated
@MichaReiser MichaReiser enabled auto-merge (squash) July 19, 2024 11:34
@MichaReiser MichaReiser merged commit ad19b3f into main Jul 19, 2024
@MichaReiser MichaReiser deleted the red-knot-cli-verbosity branch July 19, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants