Skip to content

Commit

Permalink
Merge pull request #117 from Moohan/patch-1
Browse files Browse the repository at this point in the history
Add language definition for R
  • Loading branch information
alstr committed May 20, 2022
2 parents 872972d + 13ebb37 commit 7b645d3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
9 changes: 9 additions & 0 deletions syntax.json
Expand Up @@ -611,5 +611,14 @@
"pattern": "#"
}
]
},
{
"language": "R",
"markers": [
{
"type": "line",
"pattern": "#"
}
]
}
]
13 changes: 13 additions & 0 deletions tests/test_closed.diff
Expand Up @@ -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
}
14 changes: 14 additions & 0 deletions tests/test_new.diff
Expand Up @@ -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
+}
5 changes: 5 additions & 0 deletions tests/test_todo_parser.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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):

Expand Down

0 comments on commit 7b645d3

Please sign in to comment.