-
Notifications
You must be signed in to change notification settings - Fork 5
Quick Start
Get started by installing todoon with pip! Once you have todoon installed, you can run it "right out of the box" but it's strongly recommended that you initialize a .todo-ignore file as there can be a lot of files in your project directory that you might not be interested in maintaining (at least ignore '.git' please!)
todoon attempts to parse the comments in your code based on its file extension, see this bit of code to see how that works. It will always "fall back" on the C language's comment strings (//
for line comments and /* lorem ipsum */
for block comments) in case it doesn't know your file extension.
Any instance of the words "todo" or "fixme" (case-insensitive) in a line comment triggers a Hit. To ignore a line comment that contains a known TODO/FIXME string, add the following anywhere on the line:
todoon
For example, the following code:
# Update the todo list with one item # todoon
def add_to_todo_list(x):
list.append(x) # TODO Add additional validation
will result in only one Hit: list.append(x) # TODO Add additional validation
. Notice that the string 'todo' is in the comment above the function's signature, but it did not trigger a Hit.
Warning
Known Issues:
-
The grammar does not take into account when a line comment token is in a string. For example, the following would trigger a Hit:
print("The # of todo comments in this Python code is", n)
- Block comments are not yet implemented
The command todoignore-util
with the -p (arguments are paths) and -c (create a new file if one doesn't exist) used below with a function that collects all the hidden files and folders in the working directory should be a good start for your .todo-ignore file.
TODO untested
pip install --upgrade todo-or-not
todoignore-util -pc $( ls -a | grep "^\.[^.]" )
todoon
This mode is not usually recommended! Use this if you are sure you don't have a large amount of files in the directory, because it will scan everything!
pip install --upgrade todo-or-not
todoon --force
Generate all the issues found in the project that haven't already been generated ( assumes issues environment is set up correctly and a .todo-ignore is in place)
gh auth login
todoon --silent --issue