feat: make file locations more navigable
Closes kemitix/forgejo-todo-checker#24
This commit is contained in:
parent
4861299549
commit
a09f95c019
2 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@ impl std::fmt::Display for Line {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
writeln!(
|
writeln!(
|
||||||
f,
|
f,
|
||||||
"{}#{}:\n {}",
|
"{}:{}:\n {}",
|
||||||
self.relative_path.to_string_lossy(),
|
self.relative_path.to_string_lossy(),
|
||||||
self.num,
|
self.num,
|
||||||
self.value.trim()
|
self.value.trim()
|
||||||
|
|
|
@ -44,9 +44,9 @@ fn find_markers_in_dir() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
printer.messages.take(),
|
printer.messages.take(),
|
||||||
vec![
|
vec![
|
||||||
"- Issue number missing: file_with_invalids.txt#3:\n It contains a todo comment: // TODO: this is it\n",
|
"- Issue number missing: file_with_invalids.txt:3:\n It contains a todo comment: // TODO: this is it\n",
|
||||||
"- Issue number missing: file_with_invalids.txt#5:\n It also contains a fix-me comment: // FIXME: and this is it\n",
|
"- Issue number missing: file_with_invalids.txt:5:\n It also contains a fix-me comment: // FIXME: and this is it\n",
|
||||||
"- Closed/Invalid Issue: (3) file_with_invalids.txt#9:\n We also have a todo comment: // TODO: (#3) and it has an issue number, but it is closed\n",
|
"- Closed/Invalid Issue: (3) file_with_invalids.txt:9:\n We also have a todo comment: // TODO: (#3) and it has an issue number, but it is closed\n",
|
||||||
format!(">> 3 errors in {}\n", file_with_invalids.strip_prefix(fs.base()).expect("strip prefix").to_string_lossy()).as_str()
|
format!(">> 3 errors in {}\n", file_with_invalids.strip_prefix(fs.base()).expect("strip prefix").to_string_lossy()).as_str()
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue