devtodo2 icon indicating copy to clipboard operation
devtodo2 copied to clipboard

Explain `--import`

Open Zearin opened this issue 11 years ago • 4 comments

The --import option is described thus:

import and synchronise TODO items from source code

But what does that mean? How does it find TODO items? Does it talk to GitHub Issues (or something)?

Zearin avatar Aug 24 '14 16:08 Zearin

It appears to print out any lines containing the string "TODO" from the file you specify. I don't know what this is supposed to accomplish as it doesn't add it to the todo list or anything, just prints them

rwyc-devon avatar Feb 10 '16 16:02 rwyc-devon

Wow, epically late to respond to this, but yes, it just prints them at the moment. I would like to finish it, but it's actually quite a bit of work. The initial "addition" of the entries is quite simple, but it's the tracking of them that's a bit more work.

Actually, thinking about it, it's probably not so bad... hash the body of all TODO entries, then just mark any open TODO entries that don't match a hash, as done.

alecthomas avatar Feb 10 '16 16:02 alecthomas

With some careful restrictions to avoid trampling over one's manually added (eg not synced from a source file) todos. Perhaps any imported todo gets automatically grafted to a special parent marked with the filename?

rwyc-devon avatar Feb 10 '16 16:02 rwyc-devon

I think an extra "synced bool" attribute on the struct would be a good option, but yeah.

alecthomas avatar Feb 10 '16 16:02 alecthomas