Organize TODOs in code into Rstudio

rstudio

#1

Is there any way of getting a complete TODO list for my project ina an organized way?
I think on working on Rstudio and leaving some TODO marks all along the code to be done later and somehow getting all TODOs organized on one Markdown page or panel to check.

I’m thinking on something similar (if possible) to Atom Editor imdone package


#2

Nice idea!

Currently, it is what I do leaving TODO in the code. Then I use “search in files” from RStudio IDE to have a panel with to-do list. I can click on one and go directly to the correct file and line of code.

Not perfect, but key binding ctrl+shift+F make it quick and I find it useful.


#3

I have to be that guy: Using TODOs is considered bad practice by many programmers. You should rather use an issue tracker (if you are using something like bitbucket or github you already have one) or even better write a failing unit test.

To also add something helpful: What you want is super easy to implement as an RStudio addin. You just need to get the current project (rstudioapi for getting the file currently open in the editor, rprojroot for getting the project directory). Search all .R script files (list.files(), readLines(), grepl) for # TODO, and then present the results however you want (print(), shiny app).

If you really make it an rstudio addin, you can even assign a hotkey to your function.


#4

Yes, you’re right, but for short and quick project, working alone, I don’t need a issue tracker, just an easy reminder


#5

I’ve always wanted some interaction with github as a widget or sidebar inside rstudio. Would be very nice if we could integrate that. F.i. the issues in a side panel?


#6

So I too have been guilty of littering my code with TODOs. If your using git for your project you could run

git grep TODO 

In the rstudio terminal