Title: | Find All TODO Comments and More |
Version: | 0.1.2 |
Description: | This is a simple addin to 'RStudio' that finds all 'TODO', 'FIX ME', 'CHANGED' etc. comments in your project and shows them as a markers list. |
Depends: | R (≥ 3.3) |
Imports: | stringr, rex, rstudioapi, R.utils |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.1 |
Suggests: | testthat |
NeedsCompilation: | no |
Packaged: | 2021-05-24 09:41:40 UTC; dominik |
Author: | Dominik Krzemiński [aut, cre] |
Maintainer: | Dominik Krzemiński <raymon92@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2021-05-24 09:50:03 UTC |
Build TODO report in markdown syntax
Description
Extracts the list of unique files which contain a todor
marker and applies extract_markers_to_md
to each of these files.
Usage
build_markdown_report(markers)
Arguments
markers |
List of todor markers. |
Build Rstudio Markers
Description
Build Rstudio Markers
Usage
build_rstudio_markers(markers)
Arguments
markers |
list of markers |
Clean line from comment tags
Description
Clean line from comment tags
Usage
clean_comments(line, pattern = NULL)
Arguments
line |
character with comment tag to remove |
pattern |
character with pattern to detect (default NULL) |
Value
cleaned character
Examples
## Not run:
clean_comments("#' TODO abc abc") #"TODO abc abc"
## End(Not run)
Create markers
Description
Create markers
Usage
create_markers(todo.list)
Arguments
todo.list |
list of files with lists of items detected in each |
Value
markers list
Extract markers to markdown
Description
Extracts all todor
markers in a given file and converts
them to bullet-pointed markdown syntax. The file name is printed in bold at
the top of each section.
Usage
extract_markers_to_md(file, markers)
Arguments
file |
Name of file. Used to extract TODOs in that file from the list of markers. |
markers |
List of |
Find package
Description
Find package
Usage
find_package(path = getwd())
Arguments
path |
character with path to directory with R code files |
Value
package path
Find pattern
Description
Find patterns like
# TODO text
#TODO Test this thing.
#TODO: Test this thing.
#TODO - Test this thing.
<!-- TODO Test this thing. -->
<!-- TODO: Test this thing. -->
<!-- TODO - Test this thing. -->
Usage
find_pattern(text, patterns = c("TODO", "FIXME"))
Arguments
text |
character with text |
patterns |
character vector |
Value
character with pattern in brackets or NULL
List files with given extension
Description
It lists recursively with full path names.
Usage
list_files_with_extension(extension, search_path)
Arguments
extension |
character with extension |
search_path |
character with path to start searching from |
Value
list of files with specified extension
Process file
Description
It calls find_pattern
on given file and return detected markers or NULL.
Usage
process_file(filepath, patterns)
Arguments
filepath |
character with |
patterns |
vector of characters with given patterns to detect, e.g. c("TODO", "BUG") |
Value
list of markers (which are lists describing properties of detected item from find_pattern)
TODOR This package helps you to find all code rows in your code with places to be filled in the future.
Description
Called on project that are not R packages. Checks all places in the code
which require amendents as specified in todo_types
on R and r files.
It triggers rstudio markers to appear.
Usage
todor(
todo_types = NULL,
search_path = getwd(),
file = NULL,
output = "markers"
)
Arguments
todo_types |
vector with character describing types of elements to detect. If NULL default items will be used. |
search_path |
vector with paths that contains comments you are looking for. |
file |
character with path to file. If not NULL the search_path will be ignored. |
output |
what form should the output take? "markers" (default) creates a marker for each TODO and lists them in the "Markers" Rstudio pane. "text" coverts the TODO list to markdown syntax |
Details
There are several options that let you control TODOr behaviour:
todor_rmd
- when set to TRUE it searches also through Rmd files
(default TRUE).
todor_rnw
- when set to TRUE it searches also through Rnw files
(default FALSE).
todor_rhtml
- when set to TRUE it searches also through Rhtml files
(default FALSE).
todor_exclude_packrat
when set to FALSE, all files in the "packrat"
directory are excluded (default TRUE).
todor_exclude_r
when TRUE, it ignores R and r files (default FALSE)
todor_patterns
must be vector. Contains all the names of patterns to
be detected. Default are: "FIXME", "TODO", "CHANGED", "IDEA", "HACK", "NOTE",
"REVIEW", "BUG", "QUESTION", "COMBAK", "TEMP".
Todor file
Description
Todor file
Usage
todor_file(file_name, todo_types = NULL, output = "markers")
Arguments
file_name |
character with file name |
todo_types |
vector with character describing types of elements to detect. If NULL default items will be used. |
output |
what form should the output take? "markers" (default) creates a marker for each TODO and lists them in the "Markers" Rstudio pane. "text" coverts the TODO list to markdown syntax |
Todor active file addin
Description
Calls todor_file
function on active document path.
Usage
todor_file_addin()
Todor Package addin
Description
Called on packages. Checks all places in the code which require amendents
as specified in todo_types
.
It triggers rstudio markers to appear.
Usage
todor_package(todo_types = NULL)
Arguments
todo_types |
vector with character describing types of elements to detect. If NULL default items will be used. |
Todor package addin
Description
Calls todor_package
function.
Usage
todor_package_addin()
Todor project addin
Description
Calls todor
function.
Usage
todor_project_addin()