All Projects → asticode → go-astitodo

asticode / go-astitodo

Licence: MIT License
Parse TODOs in your GO code

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to go-astitodo

outspline
Extensible outliner and personal time organizer to manage todo lists, schedule tasks, remind events.
Stars: ✭ 41 (-29.31%)
Mutual labels:  todo
td
a non-offensive, per project ToDo manager.
Stars: ✭ 48 (-17.24%)
Mutual labels:  todo
todo
🤖 🚀 I created Todo. Hope you like it and enjoy the open source
Stars: ✭ 16 (-72.41%)
Mutual labels:  todo
ttdl
TTDL - Terminal Todo List Manager
Stars: ✭ 91 (+56.9%)
Mutual labels:  todo
ToDo
Android application to quickly add tasks and reminders.
Stars: ✭ 13 (-77.59%)
Mutual labels:  todo
to-do-list-acf-to-rest-api
To do list using the plugin WordPress REST API
Stars: ✭ 24 (-58.62%)
Mutual labels:  todo
gtd.vim
Getting things done with Vim
Stars: ✭ 42 (-27.59%)
Mutual labels:  todo
ToDue
An android app to keep track of your ToDo's
Stars: ✭ 23 (-60.34%)
Mutual labels:  todo
To-Do
To-do is a web app that helps to organize your day-to-day activities. It lists all the activities that you need to be completed and allows you to mark them as complete or not. Tasks can also be dragged and dropped in any position. It's a minimalistic website built using JavaScript ES6, Webpack, and CSS.
Stars: ✭ 14 (-75.86%)
Mutual labels:  todo
gitlab task manager
Microsoft Todo inspired task manager leveraging Gitlab's Issue Tracker as the backend
Stars: ✭ 22 (-62.07%)
Mutual labels:  todo
serverless-todo-demo
Serverless todo web app demo
Stars: ✭ 64 (+10.34%)
Mutual labels:  todo
SimpleToDo
Task management app for Android ✔️
Stars: ✭ 104 (+79.31%)
Mutual labels:  todo
todofi.sh
Handle your todo-txt tasks directly from Rofi
Stars: ✭ 46 (-20.69%)
Mutual labels:  todo
leaf
Lightweight, self-hosted task tracking
Stars: ✭ 42 (-27.59%)
Mutual labels:  todo
mtodo
Simple Todo Software For GNU/Linux
Stars: ✭ 12 (-79.31%)
Mutual labels:  todo
github-project-todo-md
A Tool that sync between GitHub Project Board <-> Todo Markdown text.
Stars: ✭ 17 (-70.69%)
Mutual labels:  todo
meemo
Run a lightweight Meemo server with database on Docker with docker-compose
Stars: ✭ 18 (-68.97%)
Mutual labels:  todo
todo-txt
Todo.txt syntax highlighter and helper extension for visual studio code.
Stars: ✭ 39 (-32.76%)
Mutual labels:  todo
mark
mark is an markdown editor app for mac
Stars: ✭ 47 (-18.97%)
Mutual labels:  todo
react-native-todo
Very lightweight and smooth design todo app with react-native
Stars: ✭ 25 (-56.9%)
Mutual labels:  todo

GoReportCard GoDoc GoCoverage Travis

This is a Golang library and CLI to parse TODOs in your GO code.

It parses the comments from the AST and extract their TODOs. It can provide valuable information such as the TODO's assignee which can be filtered afterwards.

Most IDEs allow parsing TODOs but they usually have problems with multi line TODOs, can't parse assignees, etc.

This is also a good start for people who want to use AST.

Installation

Run

go get -u github.com/asticode/go-astitodo/...

Usage

$ astitodo -h
Usage of astitodo:
-a string
    Only TODOs assigned to this username(s) will be displayed
-e value
    Path that will be excluded from the process
-f string
    Format to use when outputting TODOs (supported formats: text, csv, json) (default "text")
-o string
    Destination for output (can be stdout, stderr or a file) (default "stdout")

Formatting

A todo is formatted this way:

    // TODO<line 1>
    // <line 2>
    // ...

You can also add an assignee:

    // TODO(this is the assignee)<message>

Examples

Basic

Assume the following file:

    package mypackage

    // TODO Damn this package seems useless

    // Here is a dummy comment
    // TODO(asticode) This variable should be dropped
    var myvariable int

    // TODO(username) This should be renamed
    var oops bool

    // TODO Damn this function should be rewritten
    // Or maybe it should be dropped as well
    func UselessFunction() {
    	var a = 1
    	a++
    }

Running

go-astitodo <paths to files or dirs>

will give

Message: Damn this package seems useless
File: mypackage/main.go:3

Assignee: asticode
Message: This variable should be dropped
File: mypackage/main.go:6

Assignee: username
Message: This variable should be renamed
File: mypackage/main.go:9

Message: Damn this function should be rewritten
Or maybe it should be dropped  as well
File: mypackage/main.go:12

Filter by assignee

Running

go-astitodo -a asticode <paths to files or dirs>

will output

Assignee: asticode
Message: This variable should be dropped
File: mypackage/main.go:6

Filter by multiple assignees

Running

astitodo -a user,anotheruser <paths to files or dirs>

will output

Assignee: asticode
Message: This variable should be dropped
File: mypackage/main.go:6

Assignee: username
Message: This variable should be renamed
File: mypackage/main.go:9

Exclude paths

You can exclude paths by running

go-astitodo -e path/to/exclude/1 -e path/to/exclude/2 <paths to files or dirs>

Change output format

You can output CSV by running

go-astitodo -f csv <path to files or dirs>

You can output JSON by running

$ astitodo -f json testdata/ | jq '[limit(1;.[])]'
    [
      {
        "Assignee": "",
        "Filename": "testdata/excluded.go",
        "Line": 3,
        "Message": [
          "This todo should be ignored as it is in the excluded path"
        ]
      }
    ]

Use the json support to filter the data with jq, then use text templating to output text content.

astitodo -f json . | jq '.[] | select(.Assignee=="") | "\(.Filename):\(.Line): \(.Message[0])"'
"encoder.go:33: It does not escape separators from the encoded data."
...

Output to a file

You can output to a file by running

go-astitodo -o <path to output file> <path to files or dirs>

Contributions

You know you want to =D

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].