alstr / todo-to-issue-action

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

Add language definition for R #117

Closed Moohan closed 2 years ago

Moohan commented 2 years ago

R

Comments are simply started with a #

I wasn't sure how to add a test...

alstr commented 2 years ago

Great, thanks very much for the contribution!

To add a test, you just need to add a code snippet to each diff file (an addition and deletion), in the style of the existing languages.

Then in the tests file, add the appropriate tests:

def test_r_issues(self):
        self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)

The number being the number of issues you expect to see when the test runs.

I'm not personally familiar with R to write a test off the top of my head.

Moohan commented 2 years ago

Tests added... not 100% sure I've done it right though, I copied the Python example as that's probably my next most familiar language.

Hopefully, I've added enough that you can fix any bits I did incorrectly?

alstr commented 2 years ago

Just had to tweak a few extensions in the tests but they both pass now, so all is good. Thanks again.