-
Notifications
You must be signed in to change notification settings - Fork 249
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
Use tab writer to improve output of invocations and errors #1356
Conversation
❌ 3 blocking issues (8 total)
|
let outfile_path = pathdiff::diff_paths(absolute_outfile_path, &cwd).unwrap(); | ||
|
||
match invocation.status() { | ||
InvocationStatus::Success => { |
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.
) | ||
.unwrap(); | ||
} | ||
InvocationStatus::LintError => { |
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.
) | ||
.unwrap(); | ||
} | ||
InvocationStatus::ParseError => { |
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.
match invocation.invocation.exit_code { | ||
Some(code) => { | ||
tw.write_all( | ||
format!( |
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.
.unwrap(); | ||
|
||
if invocation.invocation.stderr.is_empty() { | ||
if !invocation.invocation.stdout.is_empty() { |
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.
let text: String = | ||
invocation.invocation.stdout.chars().take(2048).collect(); | ||
invocation.invocation.stderr.chars().take(2048).collect(); | ||
|
||
for line in text.lines() { |
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.
qlty-cli/src/ui/invocations.rs
Outdated
|
||
for line in text.lines() { | ||
writeln!(writer, " {}", style(line).red())?; | ||
tw.write(format!(" {}", style(line).red()).as_bytes())?; |
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.
printed_summary = true; | ||
None => { | ||
tw.write_all( | ||
format!( |
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.
No description provided.