TODO or Die Hard

TODO or Die Hard!

TodoOrDiehard provides macros for Crystal that implement compile-time and runtime checked reminders.

Inspired by todo_or_die for Ruby.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      todo_or_diehard:
        github: nogginly/todo_or_diehard
  2. Run shards install

Usage

require "todo_or_diehard"

# Warning only, does not raise an exception or compile-time error
TodoOrDie["Whaaa Whaaa Whaaa!", warn_by: {2020, 1, 20}]

# Raises an OverdueTodo error
TodoOrDie["Blammo!", by: [2020, 2, 28]]

Warning only

TodoOrDie["Whaaa Whaaa Whaaa!", warn_by: {2020, 1, 20}]
# or
TodoOrDie[warning: "Whaaa Whaaa Whaaa!", y: 2020, m: 1, d: 20]

Die hard (if overdue)

TodoOrDie["Blammo!", by: [2020, 2, 28]]
# or
TodoOrDie["Blammo!", y: 2020, m: 2, d: 28]

Q&A

Why can't I use Time to set the deadline?

The standard library is not available at compile-time, and for this to work with macros we can't use Time. As a side benefit, this made the API simpler by asking for year, month, date arguments.

Contributing

Bug reports and sugestions are welcome. Otherwise, at this time, this project is closed for code changes and pull requests. I appreciate your understanding.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Contributors