Skip to content

Commit 401dca3

Browse files
committed
Add support for .cu files
1 parent 5fa8522 commit 401dca3

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ These will be applied automatically to every issue, but will be overrode by any
143143
- CSS
144144
- Crystal
145145
- Clojure
146+
- Cuda
146147
- Dart
147148
- Elixir
148149
- GDScript

syntax.json

+16
Original file line numberDiff line numberDiff line change
@@ -748,5 +748,21 @@
748748
}
749749
}
750750
]
751+
},
752+
{
753+
"language": "Cuda",
754+
"markers": [
755+
{
756+
"type": "line",
757+
"pattern": "//"
758+
},
759+
{
760+
"type": "block",
761+
"pattern": {
762+
"start": "/\\*",
763+
"end": "\\*/"
764+
}
765+
}
766+
]
751767
}
752768
]

tests/test_closed.diff

+11
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,14 @@ index 0000000..a6c6cb0
364364
-<Label Text="ok"/>
365365
<Label Text="There you go"/>
366366
<Label Text="Thank you"/>
367+
diff --git a/tests/example.cu b/tests/example.cu
368+
index 0000000..a6c6cb0
369+
--- /dev/null
370+
+++ b/tests/example.cu
371+
@@ -1,9 +1,5 @@
372+
-// TODO rename this function
373+
__global__ void test() {
374+
- /*
375+
- TODO fill this with something useful
376+
- */
377+
}

tests/test_new.diff

+14
Original file line numberDiff line numberDiff line change
@@ -403,3 +403,17 @@ index 0000000..a6c6cb0
403403
+<Label Text="why"/>
404404
+<!-- TODO: please -->
405405
+<Label Text="ok"/>
406+
diff --git a/tests/example.cu b/tests/example.cu
407+
new file mode 100644
408+
index 0000000..a6c6cb0
409+
--- /dev/null
410+
+++ b/tests/example.cu
411+
@@ -1,3 +1,11 @@
412+
+
413+
+// TODO rename this function
414+
+__global__ void test() {
415+
+ /*
416+
+ TODO fill this with something useful
417+
+ */
418+
+}
419+
+

tests/test_todo_parser.py

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def test_nix_issues(self):
9393
def test_xaml_issues(self):
9494
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'xml'), 2)
9595

96+
def test_c_cpp_like_issues(self):
97+
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)
98+
9699

97100
class ClosedIssueTests(unittest.TestCase):
98101
# Check for removed TODOs across the files specified.
@@ -173,6 +176,9 @@ def test_nix_issues(self):
173176

174177
def test_xaml_issues(self):
175178
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'xml'), 2)
179+
180+
def test_c_cpp_like_issues(self):
181+
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)
176182

177183

178184
class IgnorePatternTests(unittest.TestCase):

0 commit comments

Comments
 (0)