Created: 2014-05-18 14:44
Updated: 2017-12-05 14:32
License: mit

README.md

DoBy

Scala implementation of expiring TODO notes.

Original idea from do_by: Automatically expiring TODO notes in Ruby

tl;dr

Use this library if you want to write TODO notes with an expiration date.

An expired TODO will not compiled anymore.

Example:

TODO("YaSi", "do not write any TODO anymore", "2011/05/25")

does not compile.

Description

Developers like to write TODOs in the code to describe a possible amelioration:

// TODO: check the mime-type

As the project evolves, the number of TODOs typically grows up and nobody take care of them seriously.

With DoBy, a TODO must have an expiration date:

  • Before this date, the program compiles and runs as usual.

  • Three weeks before this date, the compiler will emit a warning about the note.

  • After this date, the program does not compile anymore. You must do something about this TODO.

Usage

Add DoBy as dependency

To use this library, add it as dependency.

libraryDependencies += "de.leanovate.doby" %% "doby" % "0.6" % "provided"

DoBy is only compatible with Scala 2.11.

Add an import

import de.leanovate.doby._

Write your TODO

A TODO note must indicate the author, a description and an expiration date.

The expiration date can be written like 2011/05/25 or like 2011-05-25

TODO("YaSi", "do not write any TODO anymore", "2011/05/25")

You can also use the general expire. For info, see the example

Changelog

version 0.6

Change the default package from de.leanovate.doby.Expiration._ to de.leanovate.doby._

FAQ

Difference with do_by in in Ruby

do_by (in ruby) throws an exception at runtime when a note is expired.

It means that an expired note will break a running program.

With DoBy (in Scala), an expired note does not have any effect on a running program. Instead, at compile time, the compiler will warn or output an error if a note is about to expire or has expired. A TODO note is written by a developer and must be take care by a developer.

Developer info

Travis: Build Status

Alternatives

Credits

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more