Skip to content

Commit

Permalink
fix: add severity to oneline message
Browse files Browse the repository at this point in the history
  • Loading branch information
suo committed Apr 15, 2022
1 parent 0bf212c commit 14495be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ pub fn render_lint_messages_oneline(
Some(desc) => desc.as_str(),
};
let description = description.lines().join(" ");
let severity = lint_message.severity.label();

writeln!(
stdout,
"{}:{}:{}: {} [{}]",
display_path, line_number, column, description, lint_message.code
"{}:{}:{}:{} {} [{}]",
display_path, line_number, column, severity, description, lint_message.code
)?;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ expression: output_lines

---
- "STDOUT:"
- "tests/fixtures/fake_source_file.rs:9:1: A dummy linter failure [DUMMY]"
- "tests/fixtures/fake_source_file.rs:9:1:Advice A dummy linter failure [DUMMY]"
- ""
- ""
- "STDERR:"
Expand Down

0 comments on commit 14495be

Please sign in to comment.