forcedtodo


License

License

GroupId

GroupId

com.marekkadek
ArtifactId

ArtifactId

forcedtodo_2.11
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

forcedtodo
forcedtodo
Project URL

Project URL

https://github.com/KadekM/scala-forced-todo
Project Organization

Project Organization

com.marekkadek
Source Code Management

Source Code Management

https://github.com/kadekm/scala-forced-todo

Download forcedtodo_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.marekkadek/forcedtodo_2.11/ -->
<dependency>
    <groupId>com.marekkadek</groupId>
    <artifactId>forcedtodo_2.11</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.marekkadek/forcedtodo_2.11/
implementation 'com.marekkadek:forcedtodo_2.11:0.0.1'
// https://jarcasting.com/artifacts/com.marekkadek/forcedtodo_2.11/
implementation ("com.marekkadek:forcedtodo_2.11:0.0.1")
'com.marekkadek:forcedtodo_2.11:jar:0.0.1'
<dependency org="com.marekkadek" name="forcedtodo_2.11" rev="0.0.1">
  <artifact name="forcedtodo_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.marekkadek', module='forcedtodo_2.11', version='0.0.1')
)
libraryDependencies += "com.marekkadek" % "forcedtodo_2.11" % "0.0.1"
[com.marekkadek/forcedtodo_2.11 "0.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8

provided (1)

Group / Artifact Type Version
org.scala-lang : scala-compiler jar 2.11.8

test (1)

Group / Artifact Type Version
com.lihaoyi : utest_2.11 jar 0.3.1

Project Modules

There are no modules declared in this project.

FORCED-TODO

Simple compiler plugin that enables you finer control of TODOs by using @todo annotation, which can fail compilation (i.e. if some todo is overdue).

Useful if you are one of people that prefer working in way of first sketching high level components and their interactions before getting down to specific details.

Before using it please understand all implications :) (collaboration with colleagues with different locales, build server...)

Example:

import forcedtodo.todo

@todo("Fix something") // always compiles since no date specified
class Foo {

    @todo("Implement real side effect", "2015-12-01") // will fail to compile after that day
    def bar(): Unit = ()

    @todo("Find better value", until = "bad_format") // will fail to compile because of invalid format
    val x = 123456
}

Date format has to be in YEAR-MONTH-DATE, such as in examples.

INSTALLATION

For scala 2.11

libraryDependencies += "com.marekkadek" %% "forcedtodo" % "0.0.1-SNAPSHOT" % "provided"

autoCompilerPlugins := true

addCompilerPlugin("com.marekkadek" %% "forcedtodo" % "0.0.1-SNAPSHOT")

For scala 2.10

"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided" // needed for 2.10.x only

TODO

  • user can specify format of dates TODOs
  • user can specify violating todos should be errors or warnings
  • user can specify what is limit of unresolved TODOs after which it fails to compile (disregarding date)
  • problem with named reversed arguments
  • improve tests (rather than just check if problem was in file)

Credits to https://github.com/lihaoyi/acyclic, some stuff stolen from there :)

Versions

Version
0.0.1