-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
less colors and more contrast in terminal #6525
Changes from all commits
c6b5e2f
3846739
719e32e
00d1ac0
f66711d
7f947ad
64113bb
aeb644c
56bf36f
adf88e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,33 +210,7 @@ fn main() -> io::Result<()> { | |
threading, | ||
) { | ||
Ok((problems, total_time)) => { | ||
println!( | ||
"\x1B[{}m{}\x1B[39m {} and \x1B[{}m{}\x1B[39m {} found in {} ms.", | ||
if problems.errors == 0 { | ||
32 // green | ||
} else { | ||
33 // yellow | ||
}, | ||
problems.errors, | ||
if problems.errors == 1 { | ||
"error" | ||
} else { | ||
"errors" | ||
}, | ||
if problems.warnings == 0 { | ||
32 // green | ||
} else { | ||
33 // yellow | ||
}, | ||
problems.warnings, | ||
if problems.warnings == 1 { | ||
"warning" | ||
} else { | ||
"warnings" | ||
}, | ||
total_time.as_millis(), | ||
); | ||
|
||
problems.print_to_stdout(total_time); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code was duplicated in |
||
Ok(problems.exit_code()) | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,22 +98,6 @@ pub fn path_to_binary(binary_name: &str) -> PathBuf { | |
path | ||
} | ||
|
||
pub fn strip_colors(str: &str) -> String { | ||
use roc_reporting::report::ANSI_STYLE_CODES; | ||
|
||
str.replace(ANSI_STYLE_CODES.red, "") | ||
.replace(ANSI_STYLE_CODES.green, "") | ||
.replace(ANSI_STYLE_CODES.yellow, "") | ||
.replace(ANSI_STYLE_CODES.blue, "") | ||
.replace(ANSI_STYLE_CODES.magenta, "") | ||
.replace(ANSI_STYLE_CODES.cyan, "") | ||
.replace(ANSI_STYLE_CODES.white, "") | ||
.replace(ANSI_STYLE_CODES.bold, "") | ||
.replace(ANSI_STYLE_CODES.underline, "") | ||
.replace(ANSI_STYLE_CODES.reset, "") | ||
.replace(ANSI_STYLE_CODES.color_reset, "") | ||
} | ||
|
||
Comment on lines
-101
to
-116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was moved. |
||
pub fn run_roc_with_stdin<I, S>(args: I, stdin_vals: &[&str]) -> Out | ||
where | ||
I: IntoIterator<Item = S>, | ||
|
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.
More self-evident names