Giter VIP home page Giter VIP logo

sbt-todolist's Introduction

sbt-todolist

Finds work in progress tags (TODO, FIXME, ...) in source files and prints them to the console.

By default, the following tags are matched (the search is case insensitive): TODO, FIXME, WIP, XXX.

About

This plugin was created (and still is) as a personal exploration of sbt internals.

While there is another plugin offering similar functionality (https://github.com/johanandren/sbt-taglist), each plugin went its own way in what they let you customize (keep reading to find out all the available configuration options) so you might want to have a look at both.

Installation

Add the following line to your local (project/plugins.sbt) or global (~/.sbt/0.13/plugins/plugins.sbt) configuration:

resolvers ++= Seq(
    "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases/"
)

addSbtPlugin("com.github.fedragon" % "sbt-todolist" % "0.6")

For sbt 1.x add this to your local (project/plugins.sbt) or global (~/.sbt/1.0/plugins/plugins.sbt) configuration:

resolvers += Resolver.sonatypeRepo("releases")

addSbtPlugin("com.github.fedragon" % "sbt-todolist" % "0.7")

Usage

sbt todos
// prints out all occurrences of configured tasks in source and test files

sbt todosTags
// shows the configured tags

Hooking todolist to an existing task

todos can optionally be added as a dependency of another task (compile, test, ...) so that it will be executed whenever the other task is executed.

How to execute it when compiling source files

Add the following lines to your build.sbt:

import TodoListPlugin._

compileWithTodolistSettings

How to execute it when running tests

Add the following lines to your build.sbt:

import TodoListPlugin._

testWithTodolistSettings

How to hook it to any other task

Add the following lines to your build.sbt:

import TodoListPlugin._

withTodolistSettings(<your task>, <its configuration>)

The two examples above are just aliases for (respectively):

withTodolistSettings(compile, Compile)
// = the `compile` task in the `Compile` configuration

and

withTodolistSettings(test, Test)

Customization

Tags to look for

The tags to look for can be redefined by adding the following line to your build.sbt:

todosTags := Set("<a tag>", "<another tag>")

The plugin performs case insensitive searches so upcasing (or not) a tag does not influence the outcome.

Highlighting

The highlighting colors can be redefined by setting one (or all) the following in your build.sbt:

import scala.Console._
todosColorFilename := CYAN
todosColorLineNumber := RED
todosColorLine := YELLOW

The colors shown above are the defaults and can be replaced with any valid scala.Console color.

sbt-todolist's People

Contributors

fedragon avatar bdzimmer avatar

Watchers

James Cloos avatar Viacheslav Rodionov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.