dokato / todor Goto Github PK
View Code? Open in Web Editor NEWTODOr - RStudio add-in for finding TODO, FIXME, CHANGED etc. comments in your code.
License: Other
TODOr - RStudio add-in for finding TODO, FIXME, CHANGED etc. comments in your code.
License: Other
Thank you for this really helpful addin. Would it be possible to let if find TODO, FIXME etc. in comments at the end of a line of code? For example here:
foo <- broken_function() # FIXME: Fix this later.
Currently this does not work for me.
I am running v 3.5 so maybe that is the first place to start. When I try to install from cran, I get the following message:
package ‘todor’ is not available (for R version 3.5.1)
So I tried the devtools install directory from github. That seemed to work. Now if I click on add-ins, I can see the two options in the drop down "Find package TODOs" and also "Find project TODOs".
When I click on "Find project TODOs" I get a pop up window that says" R code execution error" and then a message in the console that reads:
Error in dir(path = search_path, pattern = rex::rex(".", one_of("Rr"), :
invalid 'path' argument
So other random settings that may or may not be useful to know:
-I run Rstudio as admin
-I have a default wd() that is set to a subfolder on my c drive within the R 3.5 folder
Any help would be much appreciated.
Great package. One strange behavior I encountered: I had two similar .RMD reports with the same NOTE in each (in the same project).
Whenever I knitted one, the other would reopen. I finally figured that it was because of the note -- the behavior stopped once I remove the note in the second report.
It's useful to already have marks set when opening a project. Currently you have to do this manually.
... eg in the Readme.
Recently quite a lot of options were introduced.
With my workflow it's better if I can have it ONLY list todo's in .Rmd files, perhaps even in a limited subset of these. Is this a possible feature?
Currently, default tags for detection are hardcoded in inst. Would be nice to automatically change it.
Hey guys, TODOr is just a fantastic package! Incredibly useful for organization and productivity.
Do you plan to keep it stable and updated? I would like to start to use it in my long-term projects. Thank you
I am thinking of generating a nice current todo list that can be embedded in my readme file for instance.
As a user, I'd like to assign colours to categories so I can easily see BUG, FIXME, TECHDEBT, BOOKMARK etc.
Hi
Does Todor only work in RStudio (RStudio add-in aside, of course)? I only need the Todor function but if I run the following:-
x <- todor(search_path = this.dir())
I get this error:-
Error: Function sourceMarkers not found in RStudio
If Todor is only for Rstudio then that's fine, but if not then I guess this is a problem.
Thanks for writing a great package.
Cheers, Rich
Hi,
Very useful package, thank you. Just wondering if you could add an 'exclude_renv' similar to the code you have for excluding packrat etc.
The use case is that I have a local project-specific renv setup with its own cache of libraries, many of which have '#TODO' in their internal code.
If you're busy, I could potentially submit a PR, I might not be able to get around to it for a week or two though (if you agree with the idea, of course!).
Thanks!
as in the title
readme should me more informative
The todor::todor_package
function only goes through the in inst, R and tests directory. I have some todo's in my vignettes directory, it would be great to also add those to the search path
Write some unit-tests
Quite a useful package, thanks! Could you make searching for TODO items the default rather than needing to add it as an option? I don't quite understand the rationale for having it not be the default.
Enable todor
ing on single files. Currently only package are supported.
Hello !
I was wondering if it would be possible to support the active addin when focus is on the console
At line
Line 210 in 010babc
if replaced with
rstudioapi::getSourceEditorContext()$path
it would work.
happy to contribute a PR if you think this is relevant
Edit: Ref https://rstudio.github.io/rstudioapi/reference/rstudio-editors.html
or... as it's difficult to register them automatically, just add to md instruction o how to set them
Hi @dokato
One last thing - sorry for pinging you so much today!
In addition to #44, the one other thing I would love to see in todor
is for comment syntax to be removed from the TODO text. My main use of the package is to write my thesis, and so most of my TODOs are wrapped in markdown comments (<!--- --->
), which causes the Marker pane to look very "busy", e.g.:
It would be really amazing if todor
could filter the comment syntax out when presenting the TODOs in the Markers pane, so as to make the TODOs easier to read (i.e. <!--- TODO This is an example --->
would present as [ TODO ] This is an example
, rather than [ TODO ] <!--- This is an example --->
)
Is this something you would consider? Apologies if you have looked at this before and decided against it!
It seems like you could catch more markers by just expecting the TODO to have a certain structure:
# TODO
, <!-- TODO
and other schemes. # TODO Test this thing.
# TODO: Test this thing.
# TODO - Test this thing.
<!-- TODO Test this thing. -->
<!-- TODO: Test this thing. -->
<!-- TODO - Test this thing. -->
# TODO Test this thing.
# TODO: Test this thing.
# TODO - Test this thing.
<!-- TODO Test this thing. -->
<!-- TODO: Test this thing. -->
<!-- TODO - Test this thing. -->
TODO Test this thing.
TODO: Test this thing.
TODO - Test this thing.
TODO Test this thing.
TODO: Test this thing.
TODO - Test this thing.
# Fix for R e.g.double-escaping.
Search with: ^\s{0,}.{0,6}(TODO|DONE|FIXME).+?(\w.*?)\s?(-->)?$
Replace with: $1\t$2
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
TODO Test this thing.
Hi dokato - I saw reference to this package as an addin in Rstudio and think this is a great idea!
It appears this currently does not support R markdown files inside of a project. I can use it successfully with *.R files in my project but not *.Rmd (I haven't tested with other text-based files).
Is this functionality you intend to add in the future? I am using Rmd for writing my thesis and foresee many opportunities for likely leaving myself "todo" notes throughout the writing process and so think your tool would make a valuable addition to such a workflow.
Hi @dokato,
Very last thing (promise!) - when checking out the results of the new functionality in #46, I noticed that "inline" comments are not captured by todor
, e.g. if I have the following text in an Rmarkdown doc on line 147:
Participants were followed up, and were censored at the earliest of date of diagnosis, death, date of transfer out of the study cohort or end of follow-up ( <!-- TODO Get date here --> )
This does not appear as a marker when running todor()
(no "Line 147"):
Is this known behaviour?
relevant:
nickmerwin/node-coveralls#156 but nothing helped yet
Hi,
What's the code for this and please could you update the README.md? I understand how to set new todor_patterns but not how to view what it is currently looking for.
Hi! I really like this package, very useful!
In some projects (e.g., creating a hugo academic website in RStudio with blogdown
), I wished todor
would also search some additional files types, such as .md
, .toml
. Would it be possible to extend the types of files todor
searches by default? Or add a "generic" way to extend the search scope, defined in terms of file endings? Thanks!
Hey @dokato , is it possible to support multi-line comments?
Currently, todor
only displays one line, however many TODO comments are to big to fit in one line, so the second line onwards are omitted.
Having a display mode option to choose between single line and multi-line would be great, what do you think about that?
Thank you
showing how TODOr works on files
todor doesn't search .Rnw files by default when using todor::todor_project_addin()
. It also doesn't recognize LaTeX comments (e.g. comments prefixed by % instead of #). Right now, I'm using
%# TODO: thing
and calling todor::todor_file("file.Rnw")
to get a list of todos, but it would be nice if it would search all literate documents (Rnw, Rmd, Rhtml) for comments and would also detect comments natively, without the extra # character.
As a user I'd like to be able to sort by line, category and text (e.g. like a data frame pane).
I recently saw that there is an update available for this package. However, it is not obvious what changed since the previous release because this package lacks a NEWS file.
RStudio's package updater let's users view the changelogs of packages by clicking on the NEWS icon. The changelog is also available via the utils::news()
function. This is far more convenient than sifting through commit messages.
Please provide a NEWS or NEWS.md file as described in the following sources:
?utils::news
Example: https://github.com/r-lib/devtools/blob/master/NEWS.md
edit: I drafted a pull request related to this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.