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

Adds support for lua #212

Merged
merged 4 commits into from
Oct 9, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi
- Kotlin
- Less
- Liquid
- Lua
- Makefile
- Markdown
- Nix
Expand Down
16 changes: 16 additions & 0 deletions syntax.json
Original file line number Diff line number Diff line change
Expand Up @@ -837,5 +837,21 @@
}
}
]
},
{
"language": "Lua",
"markers": [
{
"type": "line",
"pattern": "--"
},
{
"type": "block",
"pattern": {
"start": "--\\[\\[",
"end": "--\\]\\]"
}
}
]
}
]
17 changes: 17 additions & 0 deletions tests/test_closed.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions tests/test_new.diff
Original file line number Diff line number Diff line change
Expand Up @@ -539,3 +539,20 @@ index 0000000..0ce9b1a
+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
--- /dev/null
+++ 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
6 changes: 6 additions & 0 deletions tests/test_todo_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def test_c_cpp_like_issues(self):
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 ClosedIssueTests(unittest.TestCase):
# Check for removed TODOs across the files specified.
def setUp(self):
Expand Down Expand Up @@ -187,6 +190,9 @@ def test_c_cpp_like_issues(self):
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):

Expand Down