alstr / todo-to-issue-action

Action that converts TODO comments to GitHub issues on push.
MIT License
603 stars 115 forks source link

Does not find C# TODOs if there is no leading space. #155

Closed skoryakin-gss closed 1 year ago

skoryakin-gss commented 1 year ago

In my C# code I have gotten into the habit of writing my todos like so: //TODO: whatever However, it seems that todo-to-issue-action only catches ones written like so: // TODO: whatever (with a space between the slashes and the TODO identifier)

I bulk replaced all my todos to include the leading space for now, but for future ones I (or other developers in the codebase) may easily forget to add the space. What is the recommended way to handle this and ensure that my added TODOs are properly added as issues, even if the leading space is ommitted?

If there is a way to accomplish this without forking the repository and modifying syntax.json, that would be preferable. I'm hoping there's just an input I'm missing or something along those lines...

PS: Thank you so much for creating this. Just started using it today, and I am loving this.

alstr commented 1 year ago

Hey there, thanks for the feedback! It's a good point, and something I've thought about before.

The main reason why the space is required is that I have always thought of that as sort of a given. I think this Stack Overflow post makes a few good points: https://stackoverflow.com/questions/1467058/space-between-line-comment-characters-and-start-of-actual-comment

That said, I can see how a space could be omitted. We'd have to modify the regex used by the action to make the space optional; I don't think editing syntax.json alone would do it. I think it could be done relatively easily though. I'll bear it in mind for a future release, but if you want to look at a PR you can do.

Thanks!

baldmanwithbeard commented 1 year ago

thank you! (this is personal account of skoryakin)