Crate todo_or_die[][src]

Expand description

TODOs you cannot forget!

todo-or-die provides procedural macros that act as checked reminders.

The name was shamelessly stolen from the ruby gem todo_or_die.

Examples

// trigger a compile error if we're past a certain date
todo_or_die::after_date!(3000, 1, 1); // its the year 3000!

// or a GitHub issue has closed
todo_or_die::issue_closed!("rust-lang", "rust", 44265); // GATs are here!

// or the latest version of a crate matches some expression
todo_or_die::crates_io!("serde", ">1.0.9000"); // its over 9000!

Skipping checks

If the environment variable TODO_OR_DIE_SKIP is set all macros will do nothing and immediately succeed. This can for example be used to skip checks locally and only perform them on CI.

Feature flags

The following optional features are available:

  • github: Enables checking if issues or pull requests are closed.
  • time: Enables checking things to do with time.
  • crate: Enables checking versions of crates.

Note that none of the features are enabled by default.

Macros

Trigger a compile error if today is after the given date

Trigger a compile error if the latest version of a crate hosted on crates.io matches some expression.

Trigger a compile error if an issue has been closed.

Trigger a compile error if a pull request has been closed or merged.