Skip to content

Commit

Permalink
Merge pull request #188 from coren-frankel/master
Browse files Browse the repository at this point in the history
add support for Liquid files (.liquid)
  • Loading branch information
alstr authored May 31, 2024
2 parents 0f3f027 + 3a40c00 commit 4120fdb
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ These will be applied automatically to every issue, but will be overrode by any
- Julia
- Kotlin
- Less
- Liquid
- 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 @@ -773,5 +773,21 @@
"pattern": "#"
}
]
},
{
"language": "Liquid",
"markers": [
{
"type": "line",
"pattern": "#"
},
{
"type": "block",
"pattern": {
"start": "{% comment %}",
"end": "{% endcomment %}"
}
}
]
}
]
16 changes: 16 additions & 0 deletions tests/test_closed.diff
Original file line number Diff line number Diff line change
Expand Up @@ -392,3 +392,19 @@ index 2996176..7545ccf 100644
- # TODO create the directory.
$(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 %}
17 changes: 17 additions & 0 deletions tests/test_new.diff
Original file line number Diff line number Diff line change
Expand Up @@ -435,3 +435,20 @@ index 0000000..2996176
+ # TODO create the directory.
+ $(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 %}
6 changes: 6 additions & 0 deletions tests/test_todo_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def test_xaml_issues(self):
def test_c_cpp_like_issues(self):
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):
# Check for removed TODOs across the files specified.
Expand Down Expand Up @@ -186,6 +189,9 @@ def test_xaml_issues(self):
def test_c_cpp_like_issues(self):
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):

Expand Down

0 comments on commit 4120fdb

Please sign in to comment.