Skip to content

Commit

Permalink
Merge pull request #163 from cyadehn/master
Browse files Browse the repository at this point in the history
Add Support for VBA Component Files
  • Loading branch information
alstr authored Sep 25, 2024
2 parents 4412cbb + c49e159 commit 2e61693
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi
- TSX
- Twig
- TypeScript
- Visual Basic for Applications (VBA)
- Vue
- XML
- YAML
Expand Down
9 changes: 9 additions & 0 deletions syntax.json
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,15 @@
}
]
},
{
"language": "VBA",
"markers": [
{
"type": "line",
"pattern": "'"
}
]
},
{
"language": "Cuda",
"markers": [
Expand Down
27 changes: 26 additions & 1 deletion tests/test_closed.diff
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,31 @@ index 0000000..a6c6cb0
-<Label Text="ok"/>
<Label Text="There you go"/>
<Label Text="Thank you"/>
diff --git a/tests/example.cls b/tests/example.cls
index 6b0c6cf..b37e70a 100644
--- a/tests/example.cls
+++ b/tests/example.cls
@@ -1,2 +1,2 @@
-' TODO: import library instead
-Public Sub ReinventTheWheel()
+Dim helper as HelperLibrary
+Set helper = New HelperLibrary
diff --git a/tests/example.bas b/tests/example.bas
index 6b0c6cf..b37e70a 100644
--- a/tests/example.bas
+++ b/tests/example.bas
@@ -1,2 +1,1 @@
-' TODO: simplify
-Public Sub MakeThingsComplicated()
+Public Sub DoItSimpler()
diff --git a/tests/example.frm b/tests/example.frm
index 6b0c6cf..b37e70a 100644
--- a/tests/example.frm
+++ b/tests/example.frm
@@ -1,2 +1,1 @@
-' TODO: remove feature to prevent legal issues
-Public Sub Plagiarize()
+Public Sub MakeOriginalIdea()
diff --git a/tests/example.cu b/tests/example.cu
index 0000000..a6c6cb0
--- /dev/null
Expand Down Expand Up @@ -391,7 +416,7 @@ index 2996176..7545ccf 100644
$(NAME): $(OBJ)
- # 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
Expand Down
21 changes: 21 additions & 0 deletions tests/test_new.diff
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,27 @@ index 0000000..a6c6cb0
+<Label Text="why"/>
+<!-- TODO: please -->
+<Label Text="ok"/>
diff --git a/tests/example.cls b/tests/example.cls
index 6b0c6cf..b37e70a 100644
--- a/tests/example.cls
+++ b/tests/example.cls
@@ -1,1 +1,2 @@
+' TODO: import library instead
Public Sub ReinventTheWheel()
diff --git a/tests/example.bas b/tests/example.bas
index 6b0c6cf..b37e70a 100644
--- a/tests/example.bas
+++ b/tests/example.bas
@@ -1,1 +1,2 @@
+' TODO: simplify
Public Sub MakeThingsComplicated()
diff --git a/tests/example.frm b/tests/example.frm
index 6b0c6cf..b37e70a 100644
--- a/tests/example.frm
+++ b/tests/example.frm
@@ -1,1 +1,2 @@
+' TODO: remove feature to prevent legal issues
Public Sub Plagiarize()
diff --git a/tests/example.cu b/tests/example.cu
new file mode 100644
index 0000000..a6c6cb0
Expand Down
5 changes: 2 additions & 3 deletions tests/test_todo_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_handlebars_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)

def test_org_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 6)
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 8)

def test_scss_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
Expand Down Expand Up @@ -100,7 +100,6 @@ def test_c_cpp_like_issues(self):
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.
def setUp(self):
Expand Down Expand Up @@ -153,7 +152,7 @@ def test_handlebars_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)

def test_org_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 6)
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 8)

def test_scss_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
Expand Down

0 comments on commit 2e61693

Please sign in to comment.