diff --git a/syntax.json b/syntax.json index fbdb5f3..e8dad92 100644 --- a/syntax.json +++ b/syntax.json @@ -163,6 +163,15 @@ } ] }, + { + "language": "JSON5", + "markers": [ + { + "type": "line", + "pattern": "//" + } + ] + }, { "language": "Julia", "markers": [ diff --git a/tests/test_new.diff b/tests/test_new.diff index c1c81d6..f8de332 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -292,3 +292,17 @@ index 0000000..525e25d + # This function should probably do something more interesting + # labels: help wanted +} +diff --git a/tests/example_file.r b/tests/config.json5 +new file mode 100644 +index 0000000..525f56e +--- /dev/null ++++ b/tests/example_file.json5 +@@ -0,0 +1,7 @@ ++{ ++ "myConfig": [ ++ // GitRepository where 'Git release/tag' matches 'Helm' version ++ "itIsWonderful", ++ // TODO: Delete this line from the codebase ++ "butItHasSomePendingActivities" ++ ] ++} \ No newline at end of file diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index 0753ab1..023c3de 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -33,6 +33,9 @@ class NewIssueTests(unittest.TestCase): def test_java_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'java'), 2) + def test_json5_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'json5'), 1) + def test_ruby_issues(self): # Includes 2 tests for Crystal. self.assertEqual(count_issues_for_file_type(self.raw_issues, 'ruby'), 5)