Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language definition for R #117

Merged
merged 5 commits into from May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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