diff --git a/Makefile b/Makefile index c1cdc30c..17465aed 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ CARGO_TARGET_DIR ?= target MIN_RUSTC ?= 1.65.0 CARGO_BIN ?= cargo +TAGREF_BIN ?= tagref CARGO_ARGS ?= CARGO_SORT_BIN = cargo-sort PRINTF = /usr/bin/printf @@ -94,7 +95,7 @@ help: @#@echo "* CARGO_COLOR = ${CARGO_COLOR}" .PHONY: check -check: +check: check-tagrefs @${CARGO_BIN} check ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" ${FEATURES} --all --tests --examples --benches --bins .PHONY: fmt @@ -185,3 +186,13 @@ deb-dist: .PHONY: build-rustdoc build-rustdoc: @RUSTDOCFLAGS="--crate-version ${VERSION}_${GIT_COMMIT}_${DATE}" ${CARGO_BIN} doc ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --all-features --no-deps --workspace --document-private-items --open + +.PHONY: check-tagrefs +check-tagrefs: + @(if ! command -v "$(TAGREF_BIN)" > /dev/null;\ + then \ + $(PRINTF) "Warning: tagref binary not in PATH.\n" 1>&2;\ + exit;\ + else \ + $(TAGREF_BIN);\ + fi) diff --git a/meli/docs/meli.7 b/meli/docs/meli.7 index 75fbb29f..fbed6f0c 100644 --- a/meli/docs/meli.7 +++ b/meli/docs/meli.7 @@ -717,7 +717,7 @@ for PGP configuration. .It Cm save-draft saves a copy of the draft in the Draft folder .El -.\" TODO add contacts section +.\" [ref:TODO]: add contacts section .Sh THEMES See .Xr meli-themes 5 diff --git a/meli/src/components/mail/listing.rs b/meli/src/components/mail/listing.rs index 9a5fc1e1..3753b42e 100644 --- a/meli/src/components/mail/listing.rs +++ b/meli/src/components/mail/listing.rs @@ -31,7 +31,7 @@ use smallvec::SmallVec; use super::*; use crate::{conf::accounts::JobRequest, types::segment_tree::SegmentTree}; -// TODO: emoji_text_presentation_selector should be printed along with the chars +// [ref:TODO]: emoji_text_presentation_selector should be printed along with the chars // before it but not as a separate Cell //macro_rules! emoji_text_presentation_selector { // () => { @@ -55,7 +55,7 @@ pub const DEFAULT_SNOOZED_FLAG: &str = "💤"; pub struct RowsState { pub selection: HashMap, pub row_updates: SmallVec<[EnvelopeHash; 8]>, - /// FIXME: env vec should have at least one element guaranteed + /// [ref:FIXME]: env vec should have at least one element guaranteed pub thread_to_env: HashMap>, pub env_to_thread: HashMap, pub thread_order: HashMap, diff --git a/meli/src/components/mail/listing/compact.rs b/meli/src/components/mail/listing/compact.rs index 4df8c1c7..5c1bae98 100644 --- a/meli/src/components/mail/listing/compact.rs +++ b/meli/src/components/mail/listing/compact.rs @@ -589,7 +589,7 @@ impl ListingTrait for CompactListing { .get_thread_under_cursor(self.cursor_pos.2 + 1) .is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Down(1)); self.force_draw = true; self.dirty = true; @@ -609,7 +609,7 @@ impl ListingTrait for CompactListing { .get_thread_under_cursor(self.cursor_pos.2 - 1) .is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Up(1)); self.force_draw = true; self.dirty = true; @@ -1848,7 +1848,7 @@ impl Component for CompactListing { self.sort = (*field, *order); self.sortcmd = true; if !self.filtered_selection.is_empty() { - // FIXME: perform sort + // [ref:FIXME]: perform sort self.set_dirty(true); } else { self.refresh_mailbox(context, false); @@ -1857,10 +1857,11 @@ impl Component for CompactListing { } Action::SubSort(field, order) if !self.unfocused() => { self.subsort = (*field, *order); - // FIXME: perform subsort. + // [ref:FIXME]: perform subsort. return true; } Action::Listing(ToggleThreadSnooze) if !self.unfocused() => { + // [ref:FIXME]: Re-implement toggle thread snooze /* let thread = self.get_thread_under_cursor(self.cursor_pos.2); let account = &mut context.accounts[&self.cursor_pos.0]; diff --git a/meli/src/components/mail/listing/conversations.rs b/meli/src/components/mail/listing/conversations.rs index 2d45d3a7..09909702 100644 --- a/meli/src/components/mail/listing/conversations.rs +++ b/meli/src/components/mail/listing/conversations.rs @@ -402,7 +402,7 @@ impl ListingTrait for ConversationsListing { .get_thread_under_cursor(self.cursor_pos.2 + 1) .is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Down(1)); self.force_draw = true; self.dirty = true; @@ -422,7 +422,7 @@ impl ListingTrait for ConversationsListing { .get_thread_under_cursor(self.cursor_pos.2 - 1) .is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Up(1)); self.force_draw = true; self.dirty = true; diff --git a/meli/src/components/mail/listing/plain.rs b/meli/src/components/mail/listing/plain.rs index 783d3606..4d808eaa 100644 --- a/meli/src/components/mail/listing/plain.rs +++ b/meli/src/components/mail/listing/plain.rs @@ -319,7 +319,7 @@ impl ListingTrait for PlainListing { fn next_entry(&mut self, context: &mut Context) { if self.get_env_under_cursor(self.cursor_pos.2 + 1).is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Down(1)); self.force_draw = true; self.dirty = true; @@ -336,7 +336,7 @@ impl ListingTrait for PlainListing { return; } if self.get_env_under_cursor(self.cursor_pos.2 - 1).is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Up(1)); self.force_draw = true; self.dirty = true; diff --git a/meli/src/components/mail/listing/thread.rs b/meli/src/components/mail/listing/thread.rs index 7fee8513..ded2f342 100644 --- a/meli/src/components/mail/listing/thread.rs +++ b/meli/src/components/mail/listing/thread.rs @@ -435,7 +435,7 @@ impl ListingTrait for ThreadListing { fn next_entry(&mut self, context: &mut Context) { if self.get_env_under_cursor(self.cursor_pos.2 + 1).is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Down(1)); self.force_draw = true; self.dirty = true; @@ -450,7 +450,7 @@ impl ListingTrait for ThreadListing { return; } if self.get_env_under_cursor(self.cursor_pos.2 - 1).is_some() { - // TODO: makes this less ugly. + // [ref:TODO]: makes this less ugly. self.movement = Some(PageMovement::Up(1)); self.force_draw = true; self.dirty = true; @@ -757,7 +757,6 @@ impl ThreadListing { fn highlight_line_self(&mut self, _idx: usize, _context: &Context) { /* - * FIXME if self.length == 0 { return; } diff --git a/meli/src/components/mail/view.rs b/meli/src/components/mail/view.rs index f213da33..48ab5439 100644 --- a/meli/src/components/mail/view.rs +++ b/meli/src/components/mail/view.rs @@ -653,7 +653,7 @@ impl Component for MailView { /* autosend or open unsubscribe option */ let unsubscribe = actions.unsubscribe.as_ref().unwrap(); for option in unsubscribe.iter() { - /* TODO: Ask for confirmation before proceding with an action */ + /* [ref:TODO]: Ask for confirmation before proceding with an action */ match option { list_management::ListAction::Email(email) => { if let Ok(mailto) = Mailto::try_from(*email) { diff --git a/meli/src/components/mail/view/envelope.rs b/meli/src/components/mail/view/envelope.rs index a6c995d4..9ed406fb 100644 --- a/meli/src/components/mail/view/envelope.rs +++ b/meli/src/components/mail/view/envelope.rs @@ -152,7 +152,7 @@ impl EnvelopeView { err.to_string(), Some(NotificationType::Error(melib::ErrorKind::External)), ))); - // FIXME: add `v` configurable shortcut + // [ref:FIXME]: add `v` configurable shortcut let comment = Some(format!( "Failed to start html filter process: `{}`. Press `v` to open in web \ browser. \n\n", @@ -166,7 +166,7 @@ impl EnvelopeView { }); } Ok(text) => { - // FIXME: add `v` configurable shortcut + // [ref:FIXME]: add `v` configurable shortcut let comment = Some(format!( "Text piped through `{}`. Press `v` to open in web browser. \n\n", filter_invocation diff --git a/meli/src/components/mail/view/thread.rs b/meli/src/components/mail/view/thread.rs index fe987186..af2eaa00 100644 --- a/meli/src/components/mail/view/thread.rs +++ b/meli/src/components/mail/view/thread.rs @@ -941,7 +941,7 @@ impl ThreadView { && stack.len() > 1 && stack[stack.len() - 2] >= e.indentation => { - //FIXME pop all until e.indentation + // [ref:FIXME]: pop all until e.indentation visies.push(vec![idx]); stack.pop(); (visies, stack, e.hidden) diff --git a/meli/src/components/utilities/layouts.rs b/meli/src/components/utilities/layouts.rs index 889b3154..5ce7cfdf 100644 --- a/meli/src/components/utilities/layouts.rs +++ b/meli/src/components/utilities/layouts.rs @@ -126,7 +126,7 @@ pub struct VSplit { impl fmt::Display for VSplit { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - // TODO display focused component + // [ref:TODO]: display focused component Display::fmt(&self.right, f) } } diff --git a/meli/src/components/utilities/text.rs b/meli/src/components/utilities/text.rs index 24356d58..d64512c1 100644 --- a/meli/src/components/utilities/text.rs +++ b/meli/src/components/utilities/text.rs @@ -300,7 +300,7 @@ impl Component for TextField { /* Ctrl+E End of line */ self.inner.set_cursor(self.inner.as_str().len()); } - /* TODO: add rest of readline shortcuts */ + /* [ref:TODO]: add rest of readline shortcuts */ _ => { return false; } diff --git a/meli/src/components/utilities/widgets.rs b/meli/src/components/utilities/widgets.rs index bdd6fdb7..83347665 100644 --- a/meli/src/components/utilities/widgets.rs +++ b/meli/src/components/utilities/widgets.rs @@ -863,7 +863,7 @@ impl AutoComplete { return false; } - // FIXME: remove hardcoded color values + // [ref:hardcoded_color_value] let mut content = CellBuffer::new( entries .iter() diff --git a/meli/src/conf/accounts.rs b/meli/src/conf/accounts.rs index 8fd7960e..e3a53505 100644 --- a/meli/src/conf/accounts.rs +++ b/meli/src/conf/accounts.rs @@ -2102,7 +2102,7 @@ impl Account { &self.mailbox_entries, &mut self.mailboxes_order, ); - // FIXME remove from settings as well + // [ref:FIXME] remove from settings as well self.main_loop_handler.send(ThreadEvent::UIEvent( UIEvent::Notification( @@ -2196,7 +2196,7 @@ impl Account { if err.kind.is_timeout() { self.watch(); } else { - //TODO: relaunch watch job with ratelimit for failure + // [ref:TODO]: relaunch watch job with ratelimit for failure self.main_loop_handler.send(ThreadEvent::UIEvent( UIEvent::Notification( Some(format!("{}: watch thread failed", &self.name)), diff --git a/meli/src/mailcap.rs b/meli/src/mailcap.rs index 9c2705cc..9b74758e 100644 --- a/meli/src/mailcap.rs +++ b/meli/src/mailcap.rs @@ -155,7 +155,7 @@ impl MailcapEntry { let mut f = None; let mut needs_stdin = true; let params = a.parameters(); - /* TODO: See mailcap(5) + /* [ref:TODO]: See mailcap(5) * - replace "\%" with "%" and unescape other blackslash uses. * - "%n" and "%F". * - test=xxx field. diff --git a/melib/src/backends/imap.rs b/melib/src/backends/imap.rs index 4a40e30e..70e1d49a 100644 --- a/melib/src/backends/imap.rs +++ b/melib/src/backends/imap.rs @@ -956,8 +956,9 @@ impl MailBackend for ImapType { } } - /* FIXME Do not try to CREATE a sub-mailbox in a mailbox - * that has the \Noinferiors flag set. */ + /* [ref:FIXME] Do not try to CREATE a sub-mailbox in a + * mailbox that has the \Noinferiors flag + * set. */ } let mut response = Vec::with_capacity(8 * 1024); @@ -1403,7 +1404,7 @@ impl ImapType { .iter() .any(|cap| cap.eq_ignore_ascii_case(b"LIST-STATUS")); if has_list_status { - // TODO(#222): imap-codec does not support "LIST Command Extensions" currently. + // [ref:TODO]: (#222) imap-codec does not support "LIST Command Extensions" currently. conn.send_command_raw(b"LIST \"\" \"*\" RETURN (STATUS (MESSAGES UNSEEN))") .await?; conn.read_response( diff --git a/melib/src/backends/imap/cache/sync.rs b/melib/src/backends/imap/cache/sync.rs index aa831222..e9144791 100644 --- a/melib/src/backends/imap/cache/sync.rs +++ b/melib/src/backends/imap/cache/sync.rs @@ -423,7 +423,7 @@ impl ImapConnection { // "SEARCH MODSEQ ". // 2. tag1 UID FETCH :* - // TODO(#222): imap-codec does not support "CONDSTORE/QRESYNC" currently. + // [ref:TODO]: (#222) imap-codec does not support "CONDSTORE/QRESYNC" currently. self.send_command_raw( format!( "UID FETCH {}:* (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] \ @@ -519,7 +519,7 @@ impl ImapConnection { mailbox_exists.lock().unwrap().insert_set(payload_hash_set); // 3. tag2 UID FETCH 1: FLAGS if cached_max_uid == 0 { - // TODO(#222): imap-codec does not support "CONDSTORE/QRESYNC" currently. + // [ref:TODO]: (#222) imap-codec does not support "CONDSTORE/QRESYNC" currently. self.send_command_raw( format!( "UID FETCH 1:* FLAGS (CHANGEDSINCE {})", @@ -529,7 +529,7 @@ impl ImapConnection { ) .await?; } else { - // TODO(#222): imap-codec does not support "CONDSTORE/QRESYNC" currently. + // [ref:TODO]: (#222) imap-codec does not support "CONDSTORE/QRESYNC" currently. self.send_command_raw( format!( "UID FETCH 1:{} FLAGS (CHANGEDSINCE {})", diff --git a/melib/src/backends/imap/connection.rs b/melib/src/backends/imap/connection.rs index 148b35dc..21275848 100644 --- a/melib/src/backends/imap/connection.rs +++ b/melib/src/backends/imap/connection.rs @@ -247,7 +247,7 @@ impl ImapStream { } { - // FIXME: This is blocking + // [ref:FIXME]: This is blocking let socket = socket.into_inner()?; let mut conn_result = connector.connect(path, socket); if let Err(native_tls::HandshakeError::WouldBlock(midhandshake_stream)) = diff --git a/melib/src/backends/imap/operations.rs b/melib/src/backends/imap/operations.rs index 06855b20..f3e35ac8 100644 --- a/melib/src/backends/imap/operations.rs +++ b/melib/src/backends/imap/operations.rs @@ -152,7 +152,7 @@ impl BackendOp for ImapOp { if v.len() != 1 { debug!("responses len is {}", v.len()); debug!(String::from_utf8_lossy(&response)); - /* TODO: Trigger cache invalidation here. */ + /* [ref:TODO]: Trigger cache invalidation here. */ debug!("message with UID {} was not found", uid); return Err( Error::new(format!("Invalid/unexpected response: {:?}", response)) diff --git a/melib/src/backends/imap/watch.rs b/melib/src/backends/imap/watch.rs index 09530f81..56254404 100644 --- a/melib/src/backends/imap/watch.rs +++ b/melib/src/backends/imap/watch.rs @@ -48,7 +48,7 @@ pub async fn poll_with_examine(kit: ImapWatchKit) -> Result<()> { for (_, mailbox) in mailboxes.clone() { examine_updates(mailbox, &mut conn, &uid_store).await?; } - //FIXME: make sleep duration configurable + //[ref:FIXME]: make sleep duration configurable smol::Timer::after(std::time::Duration::from_secs(3 * 60)).await; } } @@ -261,7 +261,7 @@ pub async fn examine_updates( .iter() .any(|cap| cap.eq_ignore_ascii_case(b"LIST-STATUS")); if has_list_status { - // TODO(#222): imap-codec does not support "LIST Command Extensions" currently. + // [ref:TODO]: (#222) imap-codec does not support "LIST Command Extensions" currently. conn.send_command_raw( format!( "LIST \"{}\" \"\" RETURN (STATUS (MESSAGES UNSEEN))", diff --git a/melib/src/backends/jmap.rs b/melib/src/backends/jmap.rs index 8b1814f8..4c045d39 100644 --- a/melib/src/backends/jmap.rs +++ b/melib/src/backends/jmap.rs @@ -743,7 +743,7 @@ impl MailBackend for JmapType { Flag::REPLIED => "$answered", Flag::TRASHED => "$junk", Flag::PASSED => "$passed", - _ => continue, //FIXME + _ => continue, // [ref:VERIFY] } ), if *value { diff --git a/melib/src/backends/jmap/connection.rs b/melib/src/backends/jmap/connection.rs index fddae5c4..9470ee42 100644 --- a/melib/src/backends/jmap/connection.rs +++ b/melib/src/backends/jmap/connection.rs @@ -368,7 +368,7 @@ impl JmapConnection { index: _, } in added { - // FIXME + // [ref:TODO] do something with added items } } Ok(_) => {} diff --git a/melib/src/backends/jmap/mailbox.rs b/melib/src/backends/jmap/mailbox.rs index ed43a09c..66243925 100644 --- a/melib/src/backends/jmap/mailbox.rs +++ b/melib/src/backends/jmap/mailbox.rs @@ -101,7 +101,7 @@ impl BackendMailbox for JmapMailbox { fn set_is_subscribed(&mut self, new_val: bool) -> Result<()> { self.is_subscribed = new_val; - // FIXME: jmap subscribe + // [ref:FIXME]: jmap subscribe Ok(()) } diff --git a/melib/src/backends/jmap/objects/email.rs b/melib/src/backends/jmap/objects/email.rs index d524941e..98237b0d 100644 --- a/melib/src/backends/jmap/objects/email.rs +++ b/melib/src/backends/jmap/objects/email.rs @@ -655,7 +655,7 @@ impl From for Filter { ); } AllAddresses(_) => { - //TODO + // [ref:TODO]: implement AllAddresses query for jmap } Flags(v) => { fn flag_to_filter(f: &str) -> Filter { @@ -736,16 +736,16 @@ impl From for Filter { *f = !qhs; } Answered => { - // TODO + // [ref:TODO]: implement Answered query for jmap } AnsweredBy { .. } => { - // TODO + // [ref:TODO]: implement AnsweredBy query for jmap } Larger { .. } => { - // TODO + // [ref:TODO]: implement Larger than query for jmap } Smaller { .. } => { - // TODO + // [ref:TODO]: implement Smaller than query for jmap } } } diff --git a/melib/src/backends/jmap/rfc8620/comparator.rs b/melib/src/backends/jmap/rfc8620/comparator.rs index 2d6f5eff..3926dcd8 100644 --- a/melib/src/backends/jmap/rfc8620/comparator.rs +++ b/melib/src/backends/jmap/rfc8620/comparator.rs @@ -27,7 +27,7 @@ pub struct Comparator { property: String, #[serde(default = "bool_true")] is_ascending: bool, - //FIXME + // [ref:TODO] implement collations collation: Option, //#[serde(flatten)] additional_properties: Vec, diff --git a/melib/src/backends/nntp.rs b/melib/src/backends/nntp.rs index b9319d6c..f9926bbf 100644 --- a/melib/src/backends/nntp.rs +++ b/melib/src/backends/nntp.rs @@ -841,7 +841,7 @@ impl FetchState { let new_low = std::cmp::max(low, high.saturating_sub(CHUNK_SIZE)); high_low_total.as_mut().unwrap().0 = new_low; - // FIXME: server might not implement OVER capability + // [ref:FIXME]: server might not implement OVER capability conn.send_command(format!("OVER {}-{}", new_low, high).as_bytes()) .await?; conn.read_response(&mut res, true, command_to_replycodes("OVER")) diff --git a/melib/src/backends/nntp/connection.rs b/melib/src/backends/nntp/connection.rs index f82f81dd..bad218c6 100644 --- a/melib/src/backends/nntp/connection.rs +++ b/melib/src/backends/nntp/connection.rs @@ -146,7 +146,7 @@ impl NntpStream { } { - // FIXME: This is blocking + // [ref:FIXME]: This is blocking let socket = ret.stream.into_inner()?; let mut conn_result = connector.connect(path, socket); if let Err(native_tls::HandshakeError::WouldBlock(midhandshake_stream)) = diff --git a/melib/src/backends/notmuch.rs b/melib/src/backends/notmuch.rs index 79fea253..275fbb0a 100644 --- a/melib/src/backends/notmuch.rs +++ b/melib/src/backends/notmuch.rs @@ -792,7 +792,7 @@ impl MailBackend for NotmuchDb { _mailbox_hash: MailboxHash, flags: Option, ) -> ResultFuture<()> { - // FIXME call notmuch_database_index_file ? + // [ref:FIXME]: call notmuch_database_index_file ? let path = self .save_messages_to .as_ref() diff --git a/melib/src/email.rs b/melib/src/email.rs index 6fc61217..c1d347f0 100644 --- a/melib/src/email.rs +++ b/melib/src/email.rs @@ -127,7 +127,7 @@ use crate::{ }; #[cfg(feature = "imap_backend")] -// TODO(#222): Make this `const` as soon as it is possible. +// [ref:TODO]: (#222) Make this `const` as soon as it is possible. pub(crate) fn common_attributes() -> MacroOrMessageDataItemNames<'static> { MacroOrMessageDataItemNames::MessageDataItemNames(vec![ MessageDataItemName::Uid, @@ -675,7 +675,7 @@ impl Envelope { } pub fn set_in_reply_to(&mut self, new_val: &[u8]) -> &mut Self { - // FIXME msg_id_list + // [ref:FIXME]: msg_id_list let new_val = new_val.trim(); if !new_val.is_empty() { let val = match parser::address::msg_id(new_val) { diff --git a/melib/src/email/attachments.rs b/melib/src/email/attachments.rs index 0e494c52..5680d8c0 100644 --- a/melib/src/email/attachments.rs +++ b/melib/src/email/attachments.rs @@ -672,7 +672,7 @@ impl Attachment { .. } => { ret.push(att.clone()); - // FIXME: Wrong count + // [ref:FIXME]: Wrong count for a in sub_att_vec { count_recursive(a, ret); } diff --git a/melib/src/email/compose.rs b/melib/src/email/compose.rs index 3646cdf4..e649e1fd 100644 --- a/melib/src/email/compose.rs +++ b/melib/src/email/compose.rs @@ -201,7 +201,7 @@ impl Draft { ret.headers_mut() .insert(HeaderName::TO, envelope.field_from_to_string()); } - // FIXME: add To/Cc + // [ref:FIXME]: add To/Cc } else if let Some(reply_to) = envelope.other_headers().get("Mail-Reply-To") { ret.headers_mut() .insert(HeaderName::TO, reply_to.to_string()); diff --git a/melib/src/email/compose/mime.rs b/melib/src/email/compose/mime.rs index f47e1b18..06ba42b3 100644 --- a/melib/src/email/compose/mime.rs +++ b/melib/src/email/compose/mime.rs @@ -83,7 +83,7 @@ pub fn encode_header(value: &str) -> String { } #[cfg(not(feature = "unicode_algorithms"))] { - /* TODO: test this. If it works as fine as the one above, there's no need to + /* [ref:VERIFY] [ref:TODO]: test this. If it works as fine as the one above, there's no need to * keep the above implementation. */ for (i, g) in value.char_indices() { match (g.is_ascii(), is_current_window_ascii) { diff --git a/melib/src/email/mailto.rs b/melib/src/email/mailto.rs index 6ce75f45..3d587d3b 100644 --- a/melib/src/email/mailto.rs +++ b/melib/src/email/mailto.rs @@ -373,7 +373,7 @@ mod tests { // 'mailto' URI: // . - // [tag:FIXME] + // [ref:FIXME] //assert_eq!( // mlt!("mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org"). // address, vec![addr!(r#"\"it's ugly\"@example.org"#)] @@ -399,7 +399,6 @@ mod tests { // The same subject, this time using an encoded-word (escaping the "=" // and "?" characters used in the encoded-word syntax, because they are // reserved): - // [tag:FIXME] // assert_eq!( &mlt!("mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D").headers @@ -410,7 +409,6 @@ mod tests { // The same subject, this time encoded as iso-8859-1: // - // [tag:FIXME] assert_eq!( &mlt!("mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D").headers [HDR::SUBJECT], diff --git a/melib/src/email/parser.rs b/melib/src/email/parser.rs index 38f3b979..39fdaedb 100644 --- a/melib/src/email/parser.rs +++ b/melib/src/email/parser.rs @@ -2800,7 +2800,7 @@ mod tests { ); } - // //FIXME: add file + // // [ref:FIXME]: add file //#[test] //fn test_attachments() { // use std::io::Read; diff --git a/melib/src/gpgme/mod.rs b/melib/src/gpgme/mod.rs index f4a9b62b..658ed2ef 100644 --- a/melib/src/gpgme/mod.rs +++ b/melib/src/gpgme/mod.rs @@ -19,6 +19,9 @@ * along with meli. If not, see . */ +// [ref:DEBT] segfaults on libgpgme code can crash the entire app; it should be +// handled. + use std::{ borrow::Cow, collections::HashMap, diff --git a/melib/src/lib.rs b/melib/src/lib.rs index d519f6e6..6e0d1092 100644 --- a/melib/src/lib.rs +++ b/melib/src/lib.rs @@ -53,6 +53,20 @@ clippy::significant_drop_in_scrutinee, clippy::cognitive_complexity )] +/* Source Code Annotation Tags: + * + * Global tags (in tagref format ) for source code + * annotation: + * + * - [tag:hardcoded_color_value] Replace hardcoded color values with user configurable ones. + * - [tag:needs_unit_test] + * - [tag:needs_user_doc] + * - [tag:needs_dev_doc] + * - [tag:FIXME] + * - [tag:TODO] + * - [tag:VERIFY] Verify whether this is the correct way to do something + * - [tag:DEBT] Technical debt + */ //! A crate that performs mail client operations such as //! - Hold an [`Envelope`](./email/struct.Envelope.html) with methods convenient diff --git a/melib/src/text_processing/line_break.rs b/melib/src/text_processing/line_break.rs index 3758737f..a5ac6e62 100644 --- a/melib/src/text_processing/line_break.rs +++ b/melib/src/text_processing/line_break.rs @@ -217,7 +217,7 @@ impl<'a> Iterator for LineBreakCandidateIter<'a> { * NS SJ Any */ - // TODO: LB1 + // [ref:TODO]: LB1 /* Check if next character class allows breaks before it */ let mut next_char: Option<&(usize, &str)> = iter.peek(); diff --git a/melib/src/thread.rs b/melib/src/thread.rs index d313322c..b4cd262a 100644 --- a/melib/src/thread.rs +++ b/melib/src/thread.rs @@ -343,7 +343,7 @@ impl SubjectPrefix for &[u8] { continue; } if slice.starts_with(b" ") || slice.starts_with(b"\t") || slice.starts_with(b"\r") { - //FIXME just trim whitespace + // [ref:FIXME]: just trim whitespace slice = &slice[b" ".len()..]; continue; } @@ -418,7 +418,7 @@ impl SubjectPrefix for &str { continue; } if slice.starts_with(' ') || slice.starts_with('\t') || slice.starts_with('\r') { - //FIXME just trim whitespace + // [ref:FIXME]: just trim whitespace slice = &slice[1..]; continue; } @@ -1155,7 +1155,7 @@ impl Threads { } fn inner_subsort_by(&self, _subsort: (SortField, SortOrder), _envelopes: &Envelopes) { - //FIXME: self\.thread_nodes needs interior mutability */ + // [ref:FIXME]: self\.thread_nodes needs interior mutability */ /* let Threads { ref tree_index, @@ -1499,7 +1499,7 @@ impl Threads { } pub fn roots(&self) -> SmallVec<[ThreadHash; 1024]> { - //FIXME: refactor filter + // [ref:FIXME]: refactor filter self.groups .iter() .filter_map(|(h, g)| g.root().map(|_| *h)) diff --git a/melib/src/utils/connections.rs b/melib/src/utils/connections.rs index cb6a5a86..77d6b9da 100644 --- a/melib/src/utils/connections.rs +++ b/melib/src/utils/connections.rs @@ -82,7 +82,7 @@ impl Connection { #[cfg(feature = "tls")] Tls(ref t) => t.get_ref().set_nonblocking(nonblocking), Fd(fd) => { - //FIXME TODO Review + // [ref:VERIFY] nix::fcntl::fcntl( *fd, nix::fcntl::FcntlArg::F_SETFL(if nonblocking { @@ -146,7 +146,7 @@ impl Connection { keepalive.is_some() as c_int, )?; if let Some(dur) = keepalive { - // TODO: checked cast here + // [ref:TODO]: checked cast here self.setsockopt(libc::IPPROTO_TCP, KEEPALIVE_OPTION, dur.as_secs() as c_int)?; } Ok(())