From 94022cee5162d4064c83e241881f7b40dc234f54 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Tue, 8 Oct 2024 12:16:19 +0100 Subject: [PATCH] code review --- syntax.json | 4 ++-- tests/custom_languages.json | 2 +- tests/test_closed.diff | 17 +++++++++++++++++ tests/test_new.diff | 9 ++++++--- tests/test_todo_parser.py | 7 +++++-- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/syntax.json b/syntax.json index 2ead721..d179da4 100644 --- a/syntax.json +++ b/syntax.json @@ -848,8 +848,8 @@ { "type": "block", "pattern": { - "start": "--[[", - "end": "--]]" + "start": "--\\[\\[", + "end": "--\\]\\]" } } ] diff --git a/tests/custom_languages.json b/tests/custom_languages.json index 04bd26d..2ac5c19 100644 --- a/tests/custom_languages.json +++ b/tests/custom_languages.json @@ -37,4 +37,4 @@ } ] } -] +] \ No newline at end of file diff --git a/tests/test_closed.diff b/tests/test_closed.diff index bd2a940..1b1a6cb 100644 --- a/tests/test_closed.diff +++ b/tests/test_closed.diff @@ -483,3 +483,20 @@ index 525e25d..ba4e68d 100644 -TODO: Create an issue for TODO --} -sum a b = a + b +diff --git a/init.lua b/init.lua +new file mode 100644 +index 0000000..0ce9b1a +--- a/init.lua ++++ b/init.lua +@@ -0,0 +1,11 @@ +--- TODO: Fix this +--- In the future, make a way to build these and just start the base +--- out with a large supply of each +--- labels: redesign +-local a = 1 +- +---[[ +- TODO: Fix this todo +- labels: urgent +---]] +-local b = 2 diff --git a/tests/test_new.diff b/tests/test_new.diff index 3ef80c7..db2273e 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -539,17 +539,20 @@ index 0000000..0ce9b1a +TODO: Create an issue for TODO +-} +sum a b = a + b -diff --git a/src/init.lua b/src/init.lua +diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..0ce9b1a --- /dev/null -+++ b/src/init.lua -@@ -0,0 +1,8 @@ ++++ b/init.lua +@@ -0,0 +1,11 @@ +-- TODO: Fix this +-- In the future, make a way to build these and just start the base +-- out with a large supply of each +-- labels: redesign ++local a = 1 ++ +--[[ + TODO: Fix this todo + labels: urgent +--]] ++local b = 2 diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index 7250cf2..705e764 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -100,8 +100,8 @@ class NewIssueTests(unittest.TestCase): def test_liquid_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'liquid'), 3) - def test_liquid_issues(self): - self.assertEqual(count_issues_for_file_type(self.raw_issues, 'lua'), 3) + def test_lua_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'lua'), 2) class ClosedIssueTests(unittest.TestCase): # Check for removed TODOs across the files specified. @@ -190,6 +190,9 @@ class ClosedIssueTests(unittest.TestCase): def test_liquid_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'liquid'), 3) + def test_lua_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'lua'), 2) + class IgnorePatternTests(unittest.TestCase):