Skip to content

Commit cdddfe1

Browse files
authored
Merge pull request #277 from Christian-Schou/feature/chs-add-al-code
✨ Add AL Code Support
2 parents dd4bed8 + 1e495ff commit cdddfe1

6 files changed

Lines changed: 75 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi
131131
- ABAP
132132
- ABAP CDS
133133
- Agda
134+
- AL
134135
- AutoHotkey
135136
- C
136137
- C++

syntax.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
[
2+
{
3+
"language": "AL",
4+
"markers": [
5+
{
6+
"type": "line",
7+
"pattern": "//"
8+
},
9+
{
10+
"type": "block",
11+
"pattern": {
12+
"start": "/\\*",
13+
"end": "\\*/"
14+
}
15+
}
16+
]
17+
},
218
{
319
"language": "Python",
420
"markers": [

tests/test_closed.diff

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,3 +600,30 @@ index d340f6a..29b54da 100644
600600
-labels: feature
601601
-#>
602602
Write-Host "Script completed"
603+
diff --git a/tests/ExampleCodeunit.al b/tests/ExampleCodeunit.al
604+
index a1b2c3d..5e6f7g8 100644
605+
--- a/tests/ExampleCodeunit.al
606+
+++ b/tests/ExampleCodeunit.al
607+
@@ -1,19 +1,12 @@
608+
codeunit 50100 "Example Codeunit"
609+
{
610+
- // TODO: Implement customer validation logic
611+
- // This needs to be done before go-live
612+
- // labels: enhancement
613+
614+
procedure ValidateCustomer(CustomerNo: Code[20])
615+
var
616+
Customer: Record Customer;
617+
begin
618+
- // TODO: Add validation rules
619+
- // We need to check credit limit and blocked status
620+
- // labels: urgent
621+
622+
- /*
623+
- TODO: Add error handling
624+
- labels: help wanted
625+
- */
626+
+ if Customer.Get(CustomerNo) then
627+
+ Customer.TestField(Blocked, Customer.Blocked::" ");
628+
end;
629+
}

tests/test_new.diff

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,3 +625,29 @@ index 0000000..d340f6a
625625
+labels: feature
626626
+#>
627627
+Write-Host "Script completed"
628+
diff --git a/ExampleCodeunit.al b/ExampleCodeunit.al
629+
new file mode 100644
630+
index 0000000..a1b2c3d
631+
--- /dev/null
632+
+++ b/ExampleCodeunit.al
633+
@@ -0,0 +1,19 @@
634+
+codeunit 50100 "Example Codeunit"
635+
+{
636+
+ // TODO: Implement customer validation logic
637+
+ // This needs to be done before go-live
638+
+ // labels: enhancement
639+
+
640+
+ procedure ValidateCustomer(CustomerNo: Code[20])
641+
+ var
642+
+ Customer: Record Customer;
643+
+ begin
644+
+ // TODO: Add validation rules
645+
+ // We need to check credit limit and blocked status
646+
+ // labels: urgent
647+
+
648+
+ /*
649+
+ TODO: Add error handling
650+
+ labels: help wanted
651+
+ */
652+
+ end;
653+
+}

tests/test_process_diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def run(self, result=None):
7878
"Skipping because 'SKIP_PROCESS_DIFF_TEST' is 'true'")
7979
def test_url_insertion(self):
8080
self._setUp(['test_new.diff'])
81-
self._standardTest(87)
81+
self._standardTest(90)
8282

8383
def test_line_numbering_with_deletions(self):
8484
self._setUp(['test_new_py.diff', 'test_edit_py.diff'])

tests/test_todo_parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def test_handlebars_issues(self):
8989
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)
9090

9191
def test_text_issues(self):
92-
# Includes 2 tests for Org, 2 tests for GAP, 2 tests for Visual Basic, 2 tests for Agda, 4 tests for Sol, 4 tests for Move
93-
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 16)
92+
# Includes 2 tests for Org, 2 tests for GAP, 2 tests for Visual Basic, 2 tests for Agda, 4 tests for Sol, 4 tests for Move, 3 tests for AL
93+
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 19)
9494

9595
def test_scss_issues(self):
9696
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
@@ -271,8 +271,8 @@ def test_handlebars_issues(self):
271271
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2)
272272

273273
def test_text_issues(self):
274-
# Includes 2 tests for Org, 2 tests for GAP, 2 tests for Visual Basic, 2 tests for Agda, 4 tests for Sol, 4 tests for Move
275-
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 16)
274+
# Includes 2 tests for Org, 2 tests for GAP, 2 tests for Visual Basic, 2 tests for Agda, 4 tests for Sol, 4 tests for Move, 3 tests for AL
275+
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 19)
276276

277277
def test_scss_issues(self):
278278
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)

0 commit comments

Comments
 (0)