Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

TODOr - RStudio add-in for finding TODO, FIXME, CHANGED etc. comments in your code.

License

NotificationsYou must be signed in to change notification settings

dokato/todor

Repository files navigation

CRAN statuscranlogstotalR-CMD-check

This is RStudio addin that finds allTODO,FIXME,CHANGED etc. comments in yourproject orpackage and shows them as a markers list.

Installation

Stable release from CRAN:

install.packages("todor")

The latest version:

devtools::install_github("dokato/todor")# orremotes::install_github("dokato/todor")

How to use it?

When you write an R package, sometimes it's useful to make a note in comments about a place for improvement.

simple_function<-function(a,b) {# TODO in the future check the type of input herea+b}

WithTODOr, detecting such places in the forest of code lines is simple. There are several options to do so. You can click at "Addins" button in the top panel and select one of the options:

  • "Find active file TODOs" (for the active file in RStudio editor)
  • "Find package TODOs" (if you are creating package)
  • "Find project TODOs" (if you are inside the RStudio project)

Addins panel

It is also possible to calltodor directly from RStudio console:

>todor::todor()

or you can call:

>todor::todor(c("TODO"))

to limittodor detection only to"TODO" tags.

HINT: By defaulttodor works on projects, but you can calltodor_package to search an entire package.

Regardless of the option that you have chosen, as a result you should see the Markers tab next to your console window in RStudio.

TODO Markers

To perform the search on a single file just call:

>todor::todor_file("path_to_file.R")

For more thorough walkthrough check this video-tutorial:https://youtu.be/f4mTYyD2C-8

What can it detect?

By defaultTODOr looks for the following notes:FIXME,TODO,CHANGED,IDEA,HACK,NOTE,REVIEW,BUG,QUESTION,COMBAK,TEMP.

But you may change it by settingtodor_patterns option, for example:

options(todor_patterns= c("FIXME","TODO","CUSTOM"))

Markdown

In markdown you probably don't want to use# comments. But that's okay, asTODOr supports HTML-like comments too.

#Section<!-- TODO Change this section.-->* Very important element.

You can switch off the markdown search:

options(todor_rmd=FALSE)

Other options

Searching throughRnw files (a default option is set below).

options(todor_rnw=TRUE)

Searching throughRhtml files.

options(todor_rhtml=FALSE)

Searching throughR,r files.

options(todor_exclude_r=FALSE)

Excluding packrat directory.

options(todor_exclude_packrat=TRUE)

Including extra file formats.

options(todor_extra= c("txt","dat"))options(todor_extra=NULL)

About

TODOr - RStudio add-in for finding TODO, FIXME, CHANGED etc. comments in your code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp