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 support for .cu files #179

Merged
merged 1 commit into from
Feb 17, 2024
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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