mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-22 22:06:43 +00:00
Merge master into v5
This commit is contained in:
commit
2f462edd70
@ -124,6 +124,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi
|
|||||||
|
|
||||||
- ABAP
|
- ABAP
|
||||||
- ABAP CDS
|
- ABAP CDS
|
||||||
|
- Agda
|
||||||
- AutoHotkey
|
- AutoHotkey
|
||||||
- C
|
- C
|
||||||
- C++
|
- C++
|
||||||
@ -155,6 +156,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi
|
|||||||
- Org Mode
|
- Org Mode
|
||||||
- PHP
|
- PHP
|
||||||
- Python
|
- Python
|
||||||
|
- PureScript
|
||||||
- R
|
- R
|
||||||
- Razor
|
- Razor
|
||||||
- RMarkdown
|
- RMarkdown
|
||||||
|
|||||||
4
main.py
4
main.py
@ -669,11 +669,13 @@ class TodoParser(object):
|
|||||||
"""Try and get the Markdown language and comment syntax data for the given file."""
|
"""Try and get the Markdown language and comment syntax data for the given file."""
|
||||||
file_name, extension = os.path.splitext(os.path.basename(file))
|
file_name, extension = os.path.splitext(os.path.basename(file))
|
||||||
for language_name in self.languages_dict:
|
for language_name in self.languages_dict:
|
||||||
|
# Check if the file extension matches the language's extensions.
|
||||||
if extension != '' and 'extensions' in self.languages_dict[language_name]:
|
if extension != '' and 'extensions' in self.languages_dict[language_name]:
|
||||||
syntax_details, ace_mode = self._get_language_details(language_name, 'extensions', extension)
|
syntax_details, ace_mode = self._get_language_details(language_name, 'extensions', extension)
|
||||||
if syntax_details is not None and ace_mode is not None:
|
if syntax_details is not None and ace_mode is not None:
|
||||||
return syntax_details, ace_mode
|
return syntax_details, ace_mode
|
||||||
elif 'filenames' in self.languages_dict[language_name]:
|
# Check if the file name matches the language's filenames.
|
||||||
|
if 'filenames' in self.languages_dict[language_name]:
|
||||||
syntax_details, ace_mode = self._get_language_details(language_name, 'filenames', file_name)
|
syntax_details, ace_mode = self._get_language_details(language_name, 'filenames', file_name)
|
||||||
if syntax_details is not None and ace_mode is not None:
|
if syntax_details is not None and ace_mode is not None:
|
||||||
return syntax_details, ace_mode
|
return syntax_details, ace_mode
|
||||||
|
|||||||
39
syntax.json
39
syntax.json
@ -242,6 +242,13 @@
|
|||||||
"start": "/\\*",
|
"start": "/\\*",
|
||||||
"end": "\\*/"
|
"end": "\\*/"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "block",
|
||||||
|
"pattern": {
|
||||||
|
"start": "{/\\*",
|
||||||
|
"end": "\\*/}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -357,6 +364,22 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"language": "PureScript",
|
||||||
|
"markers": [
|
||||||
|
{
|
||||||
|
"type": "line",
|
||||||
|
"pattern": "--"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "block",
|
||||||
|
"pattern": {
|
||||||
|
"start": "{-",
|
||||||
|
"end": "-}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"language": "Haskell",
|
"language": "Haskell",
|
||||||
"markers": [
|
"markers": [
|
||||||
@ -789,5 +812,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"language": "Agda",
|
||||||
|
"markers": [
|
||||||
|
{
|
||||||
|
"type": "line",
|
||||||
|
"pattern": "--"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "block",
|
||||||
|
"pattern": {
|
||||||
|
"start": "{-",
|
||||||
|
"end": "-}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -407,4 +407,63 @@ index 0000000..7cccc5b 100644
|
|||||||
-TODO: Render Liquid file
|
-TODO: Render Liquid file
|
||||||
{% assign featured_product = all_products["product_handle"] %}
|
{% assign featured_product = all_products["product_handle"] %}
|
||||||
{% render "product", product: featured_product %}
|
{% render "product", product: featured_product %}
|
||||||
-{% endcomment %}
|
-{% endcomment %}
|
||||||
|
diff --git a/tests/example_file.tsx b/tests/example_file.tsx
|
||||||
|
index 0000000..7cccc5b 100644
|
||||||
|
--- a/tests/example_file.tsx
|
||||||
|
+++ b/tests/example_file.tsx
|
||||||
|
@@ -1,7 +1,3 @@
|
||||||
|
-// TODO: rename component
|
||||||
|
-export default async function Component() {
|
||||||
|
+export default async function MyComponent() {
|
||||||
|
- /* TODO: Use state here
|
||||||
|
- labels: client */
|
||||||
|
+ const [data, setData] = useState<string>("");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
- {/*
|
||||||
|
- TODO: use styled component library
|
||||||
|
- */}
|
||||||
|
+ <StyledComponent>{data}</StyledComponent>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
diff --git a/src/Swarm/Game/example.purs b/src/Swarm/Game/example.purs
|
||||||
|
index 525e25d..ba4e68d 100644
|
||||||
|
--- a/src/Swarm/Game/example.purs
|
||||||
|
+++ b/src/Swarm/Game/example.purs
|
||||||
|
@@ -1,14 +0,0 @@
|
||||||
|
--- | Standard devices that are always installed.
|
||||||
|
---
|
||||||
|
--- TODO: Remove standard devices
|
||||||
|
--- In the future, make a way to build these and just start the base
|
||||||
|
--- out with a large supply of each?
|
||||||
|
--- labels: redesign
|
||||||
|
-stdDeviceList =
|
||||||
|
- ["treads", "grabber", "solar panel", "scanner", "plasma cutter"]
|
||||||
|
-
|
||||||
|
-{- | Very complicated function.
|
||||||
|
-
|
||||||
|
-TODO: Create an issue for TODO
|
||||||
|
--}
|
||||||
|
-sum a b = a + b
|
||||||
|
diff --git a/src/Swarm/Game/example.agda b/src/Swarm/Game/example.agda
|
||||||
|
index 525e25d..ba4e68d 100644
|
||||||
|
--- a/src/Swarm/Game/example.agda
|
||||||
|
+++ b/src/Swarm/Game/example.agda
|
||||||
|
@@ -1,14 +0,0 @@
|
||||||
|
--- | Standard devices that are always installed.
|
||||||
|
---
|
||||||
|
--- TODO: Remove standard devices
|
||||||
|
--- In the future, make a way to build these and just start the base
|
||||||
|
--- out with a large supply of each?
|
||||||
|
--- labels: redesign
|
||||||
|
-stdDeviceList =
|
||||||
|
- ["treads", "grabber", "solar panel", "scanner", "plasma cutter"]
|
||||||
|
-
|
||||||
|
-{- | Very complicated function.
|
||||||
|
-
|
||||||
|
-TODO: Create an issue for TODO
|
||||||
|
--}
|
||||||
|
-sum a b = a + b
|
||||||
|
|||||||
@ -201,6 +201,20 @@ index 0000000..525e25d
|
|||||||
+ # This function should probably do something more interesting
|
+ # This function should probably do something more interesting
|
||||||
+ # labels: help wanted
|
+ # labels: help wanted
|
||||||
+ pass
|
+ pass
|
||||||
|
diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..525e25d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/BUILD.bazel
|
||||||
|
@@ -0,0 +1,23 @@
|
||||||
|
+def hello_world():
|
||||||
|
+ # TODO: Come up with a more imaginative greeting
|
||||||
|
+ print('Hello world')
|
||||||
|
+
|
||||||
|
+ # TODO: Do more stuff
|
||||||
|
+ # This function should probably do something more interesting
|
||||||
|
+ # labels: help wanted
|
||||||
|
+ pass
|
||||||
diff --git a/tests/example_file.ahk b/src/tests/example_file.ahk
|
diff --git a/tests/example_file.ahk b/src/tests/example_file.ahk
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..7cccc5b
|
index 0000000..7cccc5b
|
||||||
@ -451,4 +465,63 @@ index 0000000..7cccc5b
|
|||||||
+TODO: Render Liquid file
|
+TODO: Render Liquid file
|
||||||
+{% assign featured_product = all_products["product_handle"] %}
|
+{% assign featured_product = all_products["product_handle"] %}
|
||||||
+{% render "product", product: featured_product %}
|
+{% render "product", product: featured_product %}
|
||||||
+{% endcomment %}
|
+{% endcomment %}
|
||||||
|
diff --git a/tests/example_file.tsx b/tests/example_file.tsx
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7cccc5b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/example_file.tsx
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+// TODO: rename component
|
||||||
|
+export default async function Component() {
|
||||||
|
+ /* TODO: Use state here
|
||||||
|
+ labels: client */
|
||||||
|
+
|
||||||
|
+ return (
|
||||||
|
+ <div>
|
||||||
|
+ {/*
|
||||||
|
+ TODO: use styled component library
|
||||||
|
+ */}
|
||||||
|
+ </div>
|
||||||
|
+ );
|
||||||
|
+}
|
||||||
|
diff --git a/src/Swarm/Game/example.purs b/src/Swarm/Game/example.purs
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..0ce9b1a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/Swarm/Game/example.purs
|
||||||
|
@@ -0,0 +1,14 @@
|
||||||
|
+-- | Standard devices that are always installed.
|
||||||
|
+--
|
||||||
|
+-- TODO: Remove standard devices
|
||||||
|
+-- In the future, make a way to build these and just start the base
|
||||||
|
+-- out with a large supply of each?
|
||||||
|
+-- labels: redesign
|
||||||
|
+stdDeviceList =
|
||||||
|
+ ["treads", "grabber", "solar panel", "scanner", "plasma cutter"]
|
||||||
|
+
|
||||||
|
+{- | Very complicated function.
|
||||||
|
+
|
||||||
|
+TODO: Create an issue for TODO
|
||||||
|
+-}
|
||||||
|
+sum a b = a + b
|
||||||
|
diff --git a/src/Swarm/Game/example.agda b/src/Swarm/Game/example.agda
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..0ce9b1a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/Swarm/Game/example.agda
|
||||||
|
@@ -0,0 +1,14 @@
|
||||||
|
+-- | Standard devices that are always installed.
|
||||||
|
+--
|
||||||
|
+-- TODO: Remove standard devices
|
||||||
|
+-- In the future, make a way to build these and just start the base
|
||||||
|
+-- out with a large supply of each?
|
||||||
|
+-- labels: redesign
|
||||||
|
+stdDeviceList =
|
||||||
|
+ ["treads", "grabber", "solar panel", "scanner", "plasma cutter"]
|
||||||
|
+
|
||||||
|
+{- | Very complicated function.
|
||||||
|
+
|
||||||
|
+TODO: Create an issue for TODO
|
||||||
|
+-}
|
||||||
|
+sum a b = a + b
|
||||||
|
|||||||
@ -23,8 +23,8 @@ class NewIssueTests(unittest.TestCase):
|
|||||||
self.raw_issues = parser.parse(diff_file)
|
self.raw_issues = parser.parse(diff_file)
|
||||||
|
|
||||||
def test_python_issues(self):
|
def test_python_issues(self):
|
||||||
# Includes 2 tests for Starlark.
|
# Includes 4 tests for Starlark.
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'python'), 6)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'python'), 8)
|
||||||
|
|
||||||
def test_yaml_issues(self):
|
def test_yaml_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2)
|
||||||
@ -35,11 +35,9 @@ class NewIssueTests(unittest.TestCase):
|
|||||||
def test_java_issues(self):
|
def test_java_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'java'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'java'), 2)
|
||||||
|
|
||||||
def test_json_with_comments_issues(self):
|
def test_javascript_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 2)
|
# Includes 1 test for JSON with Comments, 1 test for JSON5, 3 tests for TSX.
|
||||||
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 5)
|
||||||
def test_json5_issues(self):
|
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 2)
|
|
||||||
|
|
||||||
def test_ruby_issues(self):
|
def test_ruby_issues(self):
|
||||||
# Includes 2 tests for Crystal.
|
# Includes 2 tests for Crystal.
|
||||||
@ -58,7 +56,7 @@ class NewIssueTests(unittest.TestCase):
|
|||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'julia'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'julia'), 2)
|
||||||
|
|
||||||
def test_starlark_issues(self):
|
def test_starlark_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'python'), 6)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'python'), 8)
|
||||||
|
|
||||||
def test_autohotkey_issues(self):
|
def test_autohotkey_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'autohotkey'), 1)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'autohotkey'), 1)
|
||||||
@ -67,7 +65,7 @@ class NewIssueTests(unittest.TestCase):
|
|||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)
|
||||||
|
|
||||||
def test_org_issues(self):
|
def test_org_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 4)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 6)
|
||||||
|
|
||||||
def test_scss_issues(self):
|
def test_scss_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
||||||
@ -85,7 +83,7 @@ class NewIssueTests(unittest.TestCase):
|
|||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)
|
||||||
|
|
||||||
def test_haskell_issues(self):
|
def test_haskell_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'haskell'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'haskell'), 4)
|
||||||
|
|
||||||
def test_clojure_issues(self):
|
def test_clojure_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'clojure'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'clojure'), 2)
|
||||||
@ -144,11 +142,9 @@ class ClosedIssueTests(unittest.TestCase):
|
|||||||
def test_starlark_issues(self):
|
def test_starlark_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'python'), 5)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'python'), 5)
|
||||||
|
|
||||||
def test_json_with_comments_issues(self):
|
def test_javascript_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 2)
|
# Includes 1 test for JSON with Comments, 1 test for JSON5, 3 tests for TSX.
|
||||||
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 5)
|
||||||
def test_json5_issues(self):
|
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 2)
|
|
||||||
|
|
||||||
def test_autohotkey_issues(self):
|
def test_autohotkey_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'autohotkey'), 1)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'autohotkey'), 1)
|
||||||
@ -157,7 +153,7 @@ class ClosedIssueTests(unittest.TestCase):
|
|||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)
|
||||||
|
|
||||||
def test_org_issues(self):
|
def test_org_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 4)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 6)
|
||||||
|
|
||||||
def test_scss_issues(self):
|
def test_scss_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
||||||
@ -175,7 +171,7 @@ class ClosedIssueTests(unittest.TestCase):
|
|||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)
|
||||||
|
|
||||||
def test_haskell_issues(self):
|
def test_haskell_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'haskell'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'haskell'), 4)
|
||||||
|
|
||||||
def test_clojure_issues(self):
|
def test_clojure_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'clojure'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'clojure'), 2)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user