mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 00:51:11 -05:00
fix(cli): Add styling to --file-types
This commit is contained in:
parent
686e4cebe8
commit
1ca321659d
2 changed files with 7 additions and 3 deletions
|
@ -67,9 +67,11 @@ impl Report for PrintBrief {
|
|||
}
|
||||
Message::Typo(msg) => print_brief_correction(msg)?,
|
||||
Message::FileType(msg) => {
|
||||
let info = INFO.render();
|
||||
let reset = anstyle::Reset.render();
|
||||
writeln!(
|
||||
stdout().lock(),
|
||||
"{}:{}",
|
||||
"{info}{}{reset}: {}",
|
||||
msg.path.display(),
|
||||
msg.file_type.unwrap_or("-")
|
||||
)?;
|
||||
|
@ -99,9 +101,11 @@ impl Report for PrintLong {
|
|||
}
|
||||
Message::Typo(msg) => print_long_correction(msg)?,
|
||||
Message::FileType(msg) => {
|
||||
let info = INFO.render();
|
||||
let reset = anstyle::Reset.render();
|
||||
writeln!(
|
||||
stdout().lock(),
|
||||
"{}:{}",
|
||||
"{info}{}{reset}: {}",
|
||||
msg.path.display(),
|
||||
msg.file_type.unwrap_or("-")
|
||||
)?;
|
||||
|
|
|
@ -6,6 +6,6 @@ stdin = '''
|
|||
Destory
|
||||
'''
|
||||
stdout = """
|
||||
./key.asc:asc
|
||||
./key.asc: asc
|
||||
"""
|
||||
stderr = ""
|
||||
|
|
Loading…
Reference in a new issue