mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-22 22:06:43 +00:00
add liquid comment syntax w/ tests
Includes single line comment syntax with # that ignores block wrap tag requirement (e.g. {% %} enclosing line comments) for functional usage.
This commit is contained in:
parent
0f3f027d69
commit
a3b911658e
@ -159,6 +159,7 @@ These will be applied automatically to every issue, but will be overrode by any
|
|||||||
- Julia
|
- Julia
|
||||||
- Kotlin
|
- Kotlin
|
||||||
- Less
|
- Less
|
||||||
|
- Liquid
|
||||||
- Makefile
|
- Makefile
|
||||||
- Markdown
|
- Markdown
|
||||||
- Nix
|
- Nix
|
||||||
|
|||||||
16
syntax.json
16
syntax.json
@ -773,5 +773,21 @@
|
|||||||
"pattern": "#"
|
"pattern": "#"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"language": "Liquid",
|
||||||
|
"markers": [
|
||||||
|
{
|
||||||
|
"type": "line",
|
||||||
|
"pattern": "#"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "block",
|
||||||
|
"pattern": {
|
||||||
|
"start": "{% comment %}",
|
||||||
|
"end": "{% endcomment %}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -392,3 +392,19 @@ index 2996176..7545ccf 100644
|
|||||||
- # TODO create the directory.
|
- # TODO create the directory.
|
||||||
$(AR) rc $@ $(OBJ)
|
$(AR) rc $@ $(OBJ)
|
||||||
|
|
||||||
|
diff --git a/tests/example_file.liquid b/tests/example_file.liquid
|
||||||
|
index 0000000..7cccc5b 100644
|
||||||
|
--- a/tests/example_file.liquid
|
||||||
|
+++ b/tests/example_file.liquid
|
||||||
|
@@ -1,6 +0,0 @@
|
||||||
|
-{% comment %} TODO: remove loop logic {% endcomment %}
|
||||||
|
{% for i in (1..3) -%}
|
||||||
|
- # TODO: Do math here!
|
||||||
|
- # labels: help wanted
|
||||||
|
{{ i }}
|
||||||
|
{% endfor %}
|
||||||
|
-{% comment %}
|
||||||
|
-TODO: Render Liquid file
|
||||||
|
{% assign featured_product = all_products["product_handle"] %}
|
||||||
|
{% render "product", product: featured_product %}
|
||||||
|
-{% endcomment %}
|
||||||
@ -435,3 +435,20 @@ index 0000000..2996176
|
|||||||
+ # TODO create the directory.
|
+ # TODO create the directory.
|
||||||
+ $(AR) rc $@ $(OBJ)
|
+ $(AR) rc $@ $(OBJ)
|
||||||
+
|
+
|
||||||
|
diff --git a/tests/example_file.liquid b/tests/example_file.liquid
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7cccc5b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/example_file.liquid
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+{% comment %} TODO: remove loop logic {% endcomment %}
|
||||||
|
+{% for i in (1..3) -%}
|
||||||
|
+ # TODO: Do math here!
|
||||||
|
+ # labels: help wanted
|
||||||
|
+ {{ i }}
|
||||||
|
+{% endfor %}
|
||||||
|
+{% comment %}
|
||||||
|
+TODO: Render Liquid file
|
||||||
|
+{% assign featured_product = all_products["product_handle"] %}
|
||||||
|
+{% render "product", product: featured_product %}
|
||||||
|
+{% endcomment %}
|
||||||
@ -99,6 +99,9 @@ class NewIssueTests(unittest.TestCase):
|
|||||||
def test_c_cpp_like_issues(self):
|
def test_c_cpp_like_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)
|
||||||
|
|
||||||
|
def test_liquid_issues(self):
|
||||||
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'liquid'), 3)
|
||||||
|
|
||||||
|
|
||||||
class ClosedIssueTests(unittest.TestCase):
|
class ClosedIssueTests(unittest.TestCase):
|
||||||
# Check for removed TODOs across the files specified.
|
# Check for removed TODOs across the files specified.
|
||||||
@ -186,6 +189,9 @@ class ClosedIssueTests(unittest.TestCase):
|
|||||||
def test_c_cpp_like_issues(self):
|
def test_c_cpp_like_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2)
|
||||||
|
|
||||||
|
def test_liquid_issues(self):
|
||||||
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'liquid'), 3);
|
||||||
|
|
||||||
|
|
||||||
class IgnorePatternTests(unittest.TestCase):
|
class IgnorePatternTests(unittest.TestCase):
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user