Merge pull request #117 from Moohan/patch-1

Add language definition for R
This commit is contained in:
Alastair Mooney 2022-05-20 17:19:57 +01:00 committed by GitHub
commit 7b645d3041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 0 deletions

View File

@ -611,5 +611,14 @@
"pattern": "#"
}
]
},
{
"language": "R",
"markers": [
{
"type": "line",
"pattern": "#"
}
]
}
]

View File

@ -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
}

View File

@ -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
+}

View File

@ -67,6 +67,9 @@ class NewIssueTests(unittest.TestCase):
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):
# Check for removed TODOs across the files specified.
@ -123,6 +126,8 @@ class ClosedIssueTests(unittest.TestCase):
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):