aviaviavi / toodles

Project management directly from the TODOs in your codebase
MIT License
968 stars 35 forks source link

do not traverse ignored directories #61

Closed hqm42 closed 5 years ago

hqm42 commented 5 years ago

this prevents crashed due to file permissions

I had a problem with directories in my repository owned by some uid generated by docker. If we add those paths to the ignore list and prevent traversal of the directories we can work around this issue.

It is not the prettiest fix (I haven't written any haskell in years) but it works. Feedback and improvements are welcome.

aviaviavi commented 5 years ago

thank you very much for this change @hqm42! i will take a look through shortly

hqm42 commented 5 years ago

I replaced the custom direcotry traversal with an existing function from extra.

aviaviavi commented 5 years ago

So this looks like a good change, but when I try it locally it seems like some of my ignores don't actually get picked up now. Are you able to reproduce this?

aviaviavi commented 5 years ago

Hmm it seems to happen why I try to ignore the filename, rather than a directory name.

For instance, adding "Spec.hs" to this project's toodles.yaml, and observe that a TODO from spec.hs shows up in the results

hqm42 commented 5 years ago

I split up the isValidFile function so the ignore list is only used during directory traversal. I will fix this.

aviaviavi commented 5 years ago

Also, thanks for making these changes, we'll get this merged soon! :)

aviaviavi commented 5 years ago

Looks good, thanks again!