diff --git a/syntax.json b/syntax.json index 5784548..8e20108 100644 --- a/syntax.json +++ b/syntax.json @@ -611,5 +611,14 @@ "pattern": "#" } ] + }, + { + "language": "R", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] } ] diff --git a/tests/test_closed.diff b/tests/test_closed.diff index 97726ab..ba9b759 100644 --- a/tests/test_closed.diff +++ b/tests/test_closed.diff @@ -246,3 +246,16 @@ index 525e25d..ba4e68d 100644 - kept together as one todo - */} - - [ ] TODO: An inline todo that's NOT a comment (what) +diff --git a/tests/example_file.r b/tests/example_file.r +index 525e25d..ba4e68d 100644 +--- a/tests/example_file.r ++++ b/tests/example_file.r +@@ -1,23 +1,2 @@ +hello_world <- function() { +- # TODO: Come up with a more imaginative greeting + message("Hello world") +- +- # TODO: Do more stuff +- # This function should probably do something more interesting +- # labels: help wanted +} diff --git a/tests/test_new.diff b/tests/test_new.diff index 5aa04b5..7aa01e1 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -258,3 +258,17 @@ index 0000000..7cccc5b + kept together as one todo + */} + - [ ] TODO: An inline todo that's NOT a comment (what) +diff --git a/tests/example_file.r b/tests/example_file.r +new file mode 100644 +index 0000000..525e25d +--- /dev/null ++++ b/tests/example_file.r +@@ -0,0 +1,23 @@ ++hello_world <- function() { ++ # TODO: Come up with a more imaginative greeting ++ message("Hello world") ++ ++ # TODO: Do more stuff ++ # This function should probably do something more interesting ++ # labels: help wanted ++} diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index 4fecbf5..4dec87a 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -66,6 +66,9 @@ def test_twig_issues(self): def test_md_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'markdown'), 6) + + def test_r_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2) class ClosedIssueTests(unittest.TestCase): @@ -123,6 +126,8 @@ def test_twig_issues(self): def test_md_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'markdown'), 6) + def test_r_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2) class IgnorePatternTests(unittest.TestCase):