diff --git a/README.md b/README.md index e0c6e68..082a9f7 100644 --- a/README.md +++ b/README.md @@ -51,9 +51,9 @@ Forgejo TODO Checker! Repo: kemitix/my-projext Prefix: (#|//)\s*(TODO|FIXME) Issues: ( |)(\(|\(#)(?P\d+)(\)) -- Invalid: src/main.rs#38: +- Issue number missing: src/main.rs#38: // TODO: implement this cool feature and get rich! -- Closed : (19) README.md#12: +- Closed/Invalid Issue: (19) README.md#12: // TODO: (#19) This is the comment Error: Invalid or closed TODO/FIXMEs found diff --git a/src/model/markers.rs b/src/model/markers.rs index 1dee557..c16aaf5 100644 --- a/src/model/markers.rs +++ b/src/model/markers.rs @@ -21,8 +21,8 @@ impl Marker { impl std::fmt::Display for Marker { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Invalid(line) => write!(f, "- Invalid: {}", line), - Self::Closed(line, issue) => write!(f, "- Closed : ({issue}) {line}"), + Self::Invalid(line) => write!(f, "- Issue number missing: {}", line), + Self::Closed(line, issue) => write!(f, "- Closed/Invalid Issue: ({issue}) {line}"), Self::Valid(_, _) | Self::Unmarked => Ok(()), // tarpaulin uncovered okay } } diff --git a/src/tests/scanner.rs b/src/tests/scanner.rs index 02b955d..1c70974 100644 --- a/src/tests/scanner.rs +++ b/src/tests/scanner.rs @@ -43,9 +43,9 @@ fn find_markers_in_dir() -> anyhow::Result<()> { assert_eq!( printer.messages.take(), vec![ - "- Invalid: file_with_invalids.txt#3:\n It contains a todo comment: // TODO: this is it\n", - "- Invalid: file_with_invalids.txt#5:\n It also contains a fix-me comment: // FIXME: and this is it\n", - "- Closed : (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", + "- 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", + "- 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 {}", file_with_invalids.to_string_lossy()).as_str() ] );