Skip to content

Commit

Permalink
Merge pull request #179 from elftausend/master
Browse files Browse the repository at this point in the history
Add support for .cu files
  • Loading branch information
alstr committed Feb 17, 2024
2 parents 5fa8522 + 401dca3 commit 0736139
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -143,6 +143,7 @@ These will be applied automatically to every issue, but will be overrode by any
- CSS
- Crystal
- Clojure
- Cuda
- Dart
- Elixir
- GDScript
Expand Down
16 changes: 16 additions & 0 deletions syntax.json
Expand Up @@ -748,5 +748,21 @@
}
}
]
},
{
"language": "Cuda",
"markers": [
{
"type": "line",
"pattern": "//"
},
{
"type": "block",
"pattern": {
"start": "/\\*",
"end": "\\*/"
}
}
]
}
]
11 changes: 11 additions & 0 deletions tests/test_closed.diff
Expand Up @@ -364,3 +364,14 @@ index 0000000..a6c6cb0
-<Label Text="ok"/>
<Label Text="There you go"/>
<Label Text="Thank you"/>
diff --git a/tests/example.cu b/tests/example.cu
index 0000000..a6c6cb0
--- /dev/null
+++ b/tests/example.cu
@@ -1,9 +1,5 @@
-// TODO rename this function
__global__ void test() {
- /*
- TODO fill this with something useful
- */
}
14 changes: 14 additions & 0 deletions tests/test_new.diff
Expand Up @@ -403,3 +403,17 @@ index 0000000..a6c6cb0
+<Label Text="why"/>
+<!-- TODO: please -->
+<Label Text="ok"/>
diff --git a/tests/example.cu b/tests/example.cu
new file mode 100644
index 0000000..a6c6cb0
--- /dev/null
+++ b/tests/example.cu
@@ -1,3 +1,11 @@
+
+// TODO rename this function
+__global__ void test() {
+ /*
+ TODO fill this with something useful
+ */
+}
+
6 changes: 6 additions & 0 deletions tests/test_todo_parser.py
Expand Up @@ -93,6 +93,9 @@ def test_nix_issues(self):
def test_xaml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'xml'), 2)

def test_c_cpp_like_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)


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

def test_xaml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'xml'), 2)

def test_c_cpp_like_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)


class IgnorePatternTests(unittest.TestCase):
Expand Down

0 comments on commit 0736139

Please sign in to comment.