Repository: MarketSquare/robotframework-robocop
Pull request #1267 (2025-02-28 13:38:20)

Add tests for extended view for errors rules


Patch:
diff --git a/src/robocop/linter/rules/errors.py b/src/robocop/linter/rules/errors.py
index 31a8d21..71bd91d 100644
--- a/src/robocop/linter/rules/errors.py
+++ b/src/robocop/linter/rules/errors.py
@@ -331,7 +331,7 @@ class ParsingErrorChecker(VisitorChecker):
             self.handle_invalid_variable(node, error)
         elif "RETURN can only be used inside" in error or "RETURN is not allowed in this context" in error:
             token = node.data_tokens[0]
-            self.report(self.return_in_test_case, node=node, col=token.col_offset + 1, end_col=token.end_col_offset)
+            self.report(self.return_in_test_case, node=node, col=token.col_offset + 1, end_col=token.end_col_offset + 1)
         elif "IF" in error or ("ELSE" in error and If and isinstance(self.in_block, If)):
             self.handle_invalid_block(node, error, self.invalid_if)
         elif "FOR loop" in error:
@@ -346,10 +346,10 @@ class ParsingErrorChecker(VisitorChecker):
             self.handle_unsupported_settings_in_init_file(node)
         else:
             error = error.replace("\n   ", "")
-            token = node.header if hasattr(node, "header") else node
-            end_col = token.col_offset + len(node.name) + 1 if hasattr(node, "name") else token.end_col_offset + 1
-            # TODO: 'col' location here can be specified more precisely
-            self.report(self.parsing_error, error_msg=error, node=node, col=token.col_offset + 1, end_col=end_col)
+            error_node = node.header if hasattr(node, "header") else node
+            start_col = error_node.data_tokens[0].col_offset + 1
+            end_col = error_node.col_offset + len(node.name) if hasattr(node, "name") else error_node.end_col_offset
+            self.report(self.parsing_error, error_msg=error, node=node, col=start_col, end_col=end_col)
 
     def handle_invalid_block(self, node, error, block_name) -> None:
         if hasattr(node, "header"):
@@ -361,6 +361,7 @@ class ParsingErrorChecker(VisitorChecker):
             error_msg=error.replace("Robot Framework syntax error: ", "")[:-1],
             node=token,
             col=token.col_offset + 1,
+            end_col=token.end_col_offset + 1,
         )
 
     def handle_invalid_syntax(self, node, error) -> None:
@@ -631,11 +632,12 @@ class MissingKeywordName(VisitorChecker):  # TODO should be part of other checke
             )
 
 
-class VariablesImportErrorChecker(VisitorChecker):  # merge such visitors into one
+class VariablesImportErrorChecker(VisitorChecker):  # TODO merge such visitors into one
     """Checker for syntax error in variables import."""
 
     variables_import_with_args: VariablesImportWithArgsRule
 
     def visit_VariablesImport(self, node) -> None:  # noqa: N802
         if node.name and node.name.endswith((".yaml", ".yml")) and node.get_token(Token.ARGUMENT):
-            self.report(self.variables_import_with_args, node=node)
+            eol = node.get_token(Token.EOL) or node
+            self.report(self.variables_import_with_args, node=node, end_col=eol.end_col_offset)


Test patch:
diff --git a/tests/linter/rules/errors/invalid_continuation_mark/expected_extended.txt b/tests/linter/rules/errors/invalid_continuation_mark/expected_extended.txt
new file mode 100644
index 0000000..d420947
--- /dev/null
+++ b/tests/linter/rules/errors/invalid_continuation_mark/expected_extended.txt
@@ -0,0 +1,27 @@
+settings_errors.robot:6:1 ERR05 Invalid continuation mark '..'. It should be '...'
+   |
+ 4 |
+ 5 | Force Tags  tag
+ 6 | ..    tag2
+   | ^^ ERR05
+   |
+
+variable_errors.robot:4:2 ERR05 Invalid continuation mark '.... val'. It should be '...'
+   |
+ 2 | ${var}
+ 3 | ... val
+ 4 |  .... val
+   |  ^^^^ ERR05
+ 5 | value
+   |
+
+variable_errors.robot:11:1 ERR05 Invalid continuation mark '....'. It should be '...'
+    |
+  9 | @{variable}    a
+ 10 | ...    b
+ 11 | ....   c
+    | ^^^^ ERR05
+ 12 | ...
+ 13 | ...d
+    |
+
diff --git a/tests/linter/rules/errors/invalid_continuation_mark/test_rule.py b/tests/linter/rules/errors/invalid_continuation_mark/test_rule.py
index e0553eb..931c17e 100644
--- a/tests/linter/rules/errors/invalid_continuation_mark/test_rule.py
+++ b/tests/linter/rules/errors/invalid_continuation_mark/test_rule.py
@@ -4,3 +4,6 @@ from tests.linter.utils import RuleAcceptance
 class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(expected_file="expected_output.txt")
+
+    def test_extended(self):
+        self.check_rule(expected_file="expected_extended.txt", output_format="extended")
diff --git a/tests/linter/rules/errors/invalid_for_loop/expected_extended.txt b/tests/linter/rules/errors/invalid_for_loop/expected_extended.txt
new file mode 100644
index 0000000..59e119b
--- /dev/null
+++ b/tests/linter/rules/errors/invalid_for_loop/expected_extended.txt
@@ -0,0 +1,117 @@
+test.robot:37:5 ERR12 Invalid for loop syntax: FOR loop has no loop variables
+    |
+ 35 |
+ 36 | For Loop
+ 37 |     FOR  IN RANGE  10
+    |     ^^^ ERR12
+ 38 |         Keyword
+ 39 |     END
+    |
+
+test.robot:40:5 ERR12 Invalid for loop syntax: FOR loop cannot be empty
+    |
+ 38 |         Keyword
+ 39 |     END
+ 40 |     FOR  ${var}  IN  @{list}
+    |     ^^^ ERR12
+ 41 |     END
+ 42 |     FOR  ${var}  IN RANGE
+    |
+
+test.robot:42:5 ERR12 Invalid for loop syntax: FOR loop has no loop values
+    |
+ 40 |     FOR  ${var}  IN  @{list}
+ 41 |     END
+ 42 |     FOR  ${var}  IN RANGE
+    |     ^^^ ERR12
+ 43 |         Keyword
+ 44 |     END
+    |
+
+test.robot:45:5 ERR12 Invalid for loop syntax: FOR loop must have closing END
+    |
+ 43 |         Keyword
+ 44 |     END
+ 45 |     FOR  ${var}  IN RANGE  10
+    |     ^^^ ERR12
+ 46 |         Keyword
+ 47 |     FOR  ${var}  @{list}
+    |
+
+test.robot:47:5 ERR12 Invalid for loop syntax: FOR loop has no 'IN' or other valid separator
+    |
+ 45 |     FOR  ${var}  IN RANGE  10
+ 46 |         Keyword
+ 47 |     FOR  ${var}  @{list}
+    |     ^^^ ERR12
+ 48 |         Keyword
+ 49 |     END
+    |
+
+test.robot:50:5 ERR12 Invalid for loop syntax: FOR loop must have closing END
+    |
+ 48 |         Keyword
+ 49 |     END
+ 50 |     FOR  ${var}  IN  1  2  3
+    |     ^^^ ERR12
+ 51 |         FOR
+ 52 |     END
+    |
+
+test.robot:51:9 ERR12 Invalid for loop syntax: FOR loop cannot be empty
+    |
+ 49 |     END
+ 50 |     FOR  ${var}  IN  1  2  3
+ 51 |         FOR
+    |         ^^^ ERR12
+ 52 |     END
+    |
+
+test.robot:51:9 ERR12 Invalid for loop syntax: FOR loop has no loop variables
+    |
+ 49 |     END
+ 50 |     FOR  ${var}  IN  1  2  3
+ 51 |         FOR
+    |         ^^^ ERR12
+ 52 |     END
+    |
+
+test.robot:51:9 ERR12 Invalid for loop syntax: FOR loop has no 'IN' or other valid separator
+    |
+ 49 |     END
+ 50 |     FOR  ${var}  IN  1  2  3
+ 51 |         FOR
+    |         ^^^ ERR12
+ 52 |     END
+    |
+
+test.robot:56:9 ERR12 Invalid for loop syntax: FOR loop has no loop variables
+    |
+ 54 | RF 5.0 syntax
+ 55 |     TRY
+ 56 |         FOR  IN RANGE  10
+    |         ^^^ ERR12
+ 57 |             Keyword
+ 58 |         END
+    |
+
+test.robot:64:9 ERR12 Invalid for loop syntax: FOR loop has no loop variables
+    |
+ 62 |         Keyword
+ 63 |     FINALLY
+ 64 |         FOR  IN RANGE  10
+    |         ^^^ ERR12
+ 65 |             Keyword
+ 66 |         END
+    |
+
+test.robot:69:9 ERR12 Invalid for loop syntax: FOR loop has no loop variables
+    |
+ 67 |     END
+ 68 |     WHILE    ${condition}
+ 69 |         FOR  IN RANGE  10
+    |         ^^^ ERR12
+ 70 |             Keyword
+ 71 |         END
+    |
+
diff --git a/tests/linter/rules/errors/invalid_for_loop/test_rule.py b/tests/linter/rules/errors/invalid_for_loop/test_rule.py
index c9b047d..a1c75d4 100644
--- a/tests/linter/rules/errors/invalid_for_loop/test_rule.py
+++ b/tests/linter/rules/errors/invalid_for_loop/test_rule.py
@@ -7,3 +7,11 @@ class TestRuleAcceptance(RuleAcceptance):
 
     def test_rf4(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt", test_on_version="==4.*")
+
+    def test_extended(self):
+        self.check_rule(
+            src_files=["test.robot"],
+            expected_file="expected_extended.txt",
+            output_format="extended",
+            test_on_version=">=5",
+        )
diff --git a/tests/linter/rules/errors/invalid_if/expected_extended.txt b/tests/linter/rules/errors/invalid_if/expected_extended.txt
new file mode 100644
index 0000000..5127718
--- /dev/null
+++ b/tests/linter/rules/errors/invalid_if/expected_extended.txt
@@ -0,0 +1,70 @@
+test.robot:14:5 ERR13 Invalid IF syntax: ELSE IF branch cannot be empty
+    |
+ 12 |     IF    ${condition}
+ 13 |         Keyword
+ 14 |     ELSE IF  ${condition}    Empty Body
+    |     ^^^^^^^ ERR13
+ 15 |     END
+ 16 |     IF    ${condition}
+    |
+
+test.robot:14:5 ERR13 Invalid IF syntax: ELSE IF cannot have more than one condition, got '${condition}' and 'Empty Body'
+    |
+ 12 |     IF    ${condition}
+ 13 |         Keyword
+ 14 |     ELSE IF  ${condition}    Empty Body
+    |     ^^^^^^^ ERR13
+ 15 |     END
+ 16 |     IF    ${condition}
+    |
+
+test.robot:28:5 ERR13 Invalid IF syntax: Inline IF branches cannot contain assignments
+    |
+ 26 |         Keyword
+ 27 |     END
+ 28 |     IF    ${condition}    ${condition}
+    |     ^^ ERR13
+ 29 |         Keyword
+ 30 |     END
+    |
+
+test.robot:53:9 ERR13 Invalid IF syntax: IF must have a condition
+    |
+ 51 | RF 5 syntax
+ 52 |     TRY
+ 53 |         IF
+    |         ^^ ERR13
+ 54 |             Keyword
+ 55 |         END
+    |
+
+test.robot:58:13 ERR13 Invalid IF syntax: IF must have a condition
+    |
+ 56 |     EXCEPT
+ 57 |         WHILE    $condition
+ 58 |             IF
+    |             ^^ ERR13
+ 59 |                 Keyword
+ 60 |             END
+    |
+
+test.robot:63:9 ERR13 Invalid IF syntax: IF must have a condition
+    |
+ 61 |         END
+ 62 |     ELSE
+ 63 |         IF
+    |         ^^ ERR13
+ 64 |             Keyword
+ 65 |         END
+    |
+
+test.robot:72:9 ERR13 Invalid IF syntax: IF must have a condition
+    |
+ 70 | RF 7.2 Group
+ 71 |     GROUP
+ 72 |         IF
+    |         ^^ ERR13
+ 73 |             Keyword
+ 74 |         END
+    |
+
diff --git a/tests/linter/rules/errors/invalid_if/test_rule.py b/tests/linter/rules/errors/invalid_if/test_rule.py
index e390f08..f976be0 100644
--- a/tests/linter/rules/errors/invalid_if/test_rule.py
+++ b/tests/linter/rules/errors/invalid_if/test_rule.py
@@ -13,3 +13,11 @@ class TestRuleAcceptance(RuleAcceptance):
 
     def test_rf4(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output_rf4.txt", test_on_version="==4.*")
+
+    def test_extended(self):
+        self.check_rule(
+            src_files=["test.robot"],
+            expected_file="expected_extended.txt",
+            output_format="extended",
+            test_on_version=">=6.1",
+        )
diff --git a/tests/linter/rules/errors/invalid_section_in_resource/expected_extended.txt b/tests/linter/rules/errors/invalid_section_in_resource/expected_extended.txt
new file mode 100644
index 0000000..fc610eb
--- /dev/null
+++ b/tests/linter/rules/errors/invalid_section_in_resource/expected_extended.txt
@@ -0,0 +1,30 @@
+task.resource:6:1 ERR15 Resource file can't contain '*** Tasks ***' section
+   |
+ 6 | *** Tasks ***
+   | ^^^^^^^^^^^^^ ERR15
+ 7 | Task
+ 8 |     Keyword
+   |
+
+test.resource:1:1 ERR15 Resource file can't contain '*** Test Cases ***' section
+   |
+ 1 | *** Test Cases ***
+   | ^^^^^^^^^^^^^^^^^^ ERR15
+ 2 | Test case
+ 3 |     Step
+   |
+
+test.resource:5:1 ERR15 Resource file can't contain '*** tasks ***' section
+   |
+ 5 | *** tasks ***
+   | ^^^^^^^^^^^^^ ERR15
+   |
+
+test_lang.resource:3:1 ERR15 Resource file can't contain '*** Przypadki Testowe ***' section
+   |
+ 3 | *** Przypadki Testowe ***
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ ERR15
+ 4 | Test case
+ 5 |     Step
+   |
+
diff --git a/tests/linter/rules/errors/invalid_section_in_resource/test_rule.py b/tests/linter/rules/errors/invalid_section_in_resource/test_rule.py
index 0ebb0dc..160f606 100644
--- a/tests/linter/rules/errors/invalid_section_in_resource/test_rule.py
+++ b/tests/linter/rules/errors/invalid_section_in_resource/test_rule.py
@@ -7,3 +7,6 @@ class TestRuleAcceptance(RuleAcceptance):
 
     def test_rule_pre6(self):
         self.check_rule(expected_file="expected_output_pre6.txt", test_on_version="<6")
+
+    def test_extended(self):
+        self.check_rule(expected_file="expected_extended.txt", output_format="extended")
diff --git a/tests/linter/rules/errors/invalid_setting_in_resource/expected_extended.txt b/tests/linter/rules/errors/invalid_setting_in_resource/expected_extended.txt
new file mode 100644
index 0000000..fc4838f
--- /dev/null
+++ b/tests/linter/rules/errors/invalid_setting_in_resource/expected_extended.txt
@@ -0,0 +1,105 @@
+test.resource:9:1 ERR16 Settings section in resource file can't contain 'Name' setting
+   |
+ 9 | Name                Some name
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+10 | Metadata            something
+11 | Suite Setup         Keyword
+   |
+
+test.resource:10:1 ERR16 Settings section in resource file can't contain 'Metadata' setting
+    |
+  8 |
+  9 | Name                Some name
+ 10 | Metadata            something
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 11 | Suite Setup         Keyword
+ 12 | Suite Teardown      Keyword
+    |
+
+test.resource:11:1 ERR16 Settings section in resource file can't contain 'Suite Setup' setting
+    |
+  9 | Name                Some name
+ 10 | Metadata            something
+ 11 | Suite Setup         Keyword
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 12 | Suite Teardown      Keyword
+ 13 | Test Tags           one    two
+    |
+
+test.resource:12:1 ERR16 Settings section in resource file can't contain 'Suite Teardown' setting
+    |
+ 10 | Metadata            something
+ 11 | Suite Setup         Keyword
+ 12 | Suite Teardown      Keyword
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 13 | Test Tags           one    two
+ 14 | Test Setup          Keyword
+    |
+
+test.resource:13:1 ERR16 Settings section in resource file can't contain 'Test Tags' setting
+    |
+ 11 | Suite Setup         Keyword
+ 12 | Suite Teardown      Keyword
+ 13 | Test Tags           one    two
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 14 | Test Setup          Keyword
+ 15 | Test Teardown       Keyword
+    |
+
+test.resource:14:1 ERR16 Settings section in resource file can't contain 'Test Setup' setting
+    |
+ 12 | Suite Teardown      Keyword
+ 13 | Test Tags           one    two
+ 14 | Test Setup          Keyword
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 15 | Test Teardown       Keyword
+ 16 | Test Template       Template
+    |
+
+test.resource:15:1 ERR16 Settings section in resource file can't contain 'Test Teardown' setting
+    |
+ 13 | Test Tags           one    two
+ 14 | Test Setup          Keyword
+ 15 | Test Teardown       Keyword
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 16 | Test Template       Template
+ 17 | Test Timeout        1000
+    |
+
+test.resource:16:1 ERR16 Settings section in resource file can't contain 'Test Template' setting
+    |
+ 14 | Test Setup          Keyword
+ 15 | Test Teardown       Keyword
+ 16 | Test Template       Template
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 17 | Test Timeout        1000
+ 18 | Force Tags          tag
+    |
+
+test.resource:17:1 ERR16 Settings section in resource file can't contain 'Test Timeout' setting
+    |
+ 15 | Test Teardown       Keyword
+ 16 | Test Template       Template
+ 17 | Test Timeout        1000
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 18 | Force Tags          tag
+ 19 | Default Tags        tag
+    |
+
+test.resource:18:1 ERR16 Settings section in resource file can't contain 'Force Tags' setting
+    |
+ 16 | Test Template       Template
+ 17 | Test Timeout        1000
+ 18 | Force Tags          tag
+    | ^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+ 19 | Default Tags        tag
+    |
+
+test.resource:19:1 ERR16 Settings section in resource file can't contain 'Default Tags' setting
+    |
+ 17 | Test Timeout        1000
+ 18 | Force Tags          tag
+ 19 | Default Tags        tag
+    | ^^^^^^^^^^^^^^^^^^^^^^^^ ERR16
+    |
+
diff --git a/tests/linter/rules/errors/invalid_setting_in_resource/test_rule.py b/tests/linter/rules/errors/invalid_setting_in_resource/test_rule.py
index 90a16cd..17edae5 100644
--- a/tests/linter/rules/errors/invalid_setting_in_resource/test_rule.py
+++ b/tests/linter/rules/errors/invalid_setting_in_resource/test_rule.py
@@ -7,3 +7,6 @@ class TestRuleAcceptance(RuleAcceptance):
 
     def test_rule_pre6(self):
         self.check_rule(expected_file="expected_output_pre_rf6.txt", test_on_version="<=5")
+
+    def test_extended(self):
+        self.check_rule(src_files=["test.resource"], expected_file="expected_extended.txt", output_format="extended")
diff --git a/tests/linter/rules/errors/missing_keyword_name/expected_extended.txt b/tests/linter/rules/errors/missing_keyword_name/expected_extended.txt
new file mode 100644
index 0000000..2039bfa
--- /dev/null
+++ b/tests/linter/rules/errors/missing_keyword_name/expected_extended.txt
@@ -0,0 +1,78 @@
+test.robot:4:5 ERR03 Missing keyword name when calling some values
+   |
+ 2 | Keyword
+ 3 |     var
+ 4 |     ${var}
+   |     ^^^^^^ ERR03
+ 5 |     ${one}      ${two}
+ 6 |     ${var}var
+   |
+
+test.robot:5:5 ERR03 Missing keyword name when calling some values
+   |
+ 3 |     var
+ 4 |     ${var}
+ 5 |     ${one}      ${two}
+   |     ^^^^^^ ERR03
+ 6 |     ${var}var
+ 7 |     ${var} var
+   |
+
+test.robot:13:9 ERR03 Missing keyword name when calling some values
+    |
+ 11 | Nested in blocks
+ 12 |     IF    $condition
+ 13 |         ${var}
+    |         ^^^^^^ ERR03
+ 14 |     END
+ 15 |     FOR    ${var}    IN RANGE  10
+    |
+
+test.robot:16:9 ERR03 Missing keyword name when calling some values
+    |
+ 14 |     END
+ 15 |     FOR    ${var}    IN RANGE  10
+ 16 |         ${var}
+    |         ^^^^^^ ERR03
+ 17 |     END
+ 18 |     WHILE    $condition
+    |
+
+test.robot:19:9 ERR03 Missing keyword name when calling some values
+    |
+ 17 |     END
+ 18 |     WHILE    $condition
+ 19 |         ${var}
+    |         ^^^^^^ ERR03
+ 20 |     END
+ 21 |     TRY
+    |
+
+test.robot:22:9 ERR03 Missing keyword name when calling some values
+    |
+ 20 |     END
+ 21 |     TRY
+ 22 |         ${var}
+    |         ^^^^^^ ERR03
+ 23 |     EXCEPT
+ 24 |         Keyword
+    |
+
+test.robot:28:9 ERR03 Missing keyword name when calling some values
+    |
+ 26 |         Keyword
+ 27 |     FINALLY
+ 28 |         ${var}
+    |         ^^^^^^ ERR03
+ 29 |     END
+    |
+
+test.robot:33:8 ERR03 Missing keyword name when calling some values
+    |
+ 31 | Group
+ 32 |     GROUP    Missing keyword name
+ 33 |        ${var}
+    |        ^^^^^^ ERR03
+ 34 |     END
+    |
+
diff --git a/tests/linter/rules/errors/missing_keyword_name/test_rule.py b/tests/linter/rules/errors/missing_keyword_name/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/errors/missing_keyword_name/test_rule.py
+++ b/tests/linter/rules/errors/missing_keyword_name/test_rule.py
@@ -4,3 +4,6 @@ from tests.linter.utils import RuleAcceptance
 class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt")
+
+    def test_extended(self):
+        self.check_rule(src_files=["test.robot"], expected_file="expected_extended.txt", output_format="extended")
diff --git a/tests/linter/rules/errors/non_existing_setting/expected_extended.txt b/tests/linter/rules/errors/non_existing_setting/expected_extended.txt
new file mode 100644
index 0000000..61b5a40
--- /dev/null
+++ b/tests/linter/rules/errors/non_existing_setting/expected_extended.txt
@@ -0,0 +1,30 @@
+test.robot:11:5 ERR08 Non-existing setting 'Invalid'
+    |
+  9 |
+ 10 | *** Test Case ***
+ 11 |     [Invalid]  arg
+    |     ^^^^^^^^^ ERR08
+ 12 |     [Arguments]  ${arg}
+ 13 |     [Return]    ${value}
+    |
+
+test.robot:16:5 ERR08 Non-existing setting 'Argument'. Did you mean: Arguments
+    |
+ 14 |
+ 15 | *** Keywords ***
+ 16 |     [Argument]   ${value}
+    |     ^^^^^^^^^^ ERR08
+ 17 |     [Invalid]    arg
+ 18 |     [Setup]    ${arg}
+    |
+
+test.robot:17:5 ERR08 Non-existing setting 'Invalid'
+    |
+ 15 | *** Keywords ***
+ 16 |     [Argument]   ${value}
+ 17 |     [Invalid]    arg
+    |     ^^^^^^^^^ ERR08
+ 18 |     [Setup]    ${arg}
+ 19 |     [Template]    Keyword
+    |
+
diff --git a/tests/linter/rules/errors/non_existing_setting/test_rule.py b/tests/linter/rules/errors/non_existing_setting/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/errors/non_existing_setting/test_rule.py
+++ b/tests/linter/rules/errors/non_existing_setting/test_rule.py
@@ -4,3 +4,6 @@ from tests.linter.utils import RuleAcceptance
 class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt")
+
+    def test_extended(self):
+        self.check_rule(src_files=["test.robot"], expected_file="expected_extended.txt", output_format="extended")
diff --git a/tests/linter/rules/errors/parsing_error/expected_extended.txt b/tests/linter/rules/errors/parsing_error/expected_extended.txt
new file mode 100644
index 0000000..d0fd326
--- /dev/null
+++ b/tests/linter/rules/errors/parsing_error/expected_extended.txt
@@ -0,0 +1,366 @@
+invalid_try_except.robot:4:5 ERR01 Robot Framework syntax error: TRY must have closing END.
+   |
+ 2 | TRY without END
+ 3 |     [Documentation]    FAIL    TRY must have closing END.
+ 4 |     TRY
+   |     ^^^ ERR01
+ 5 |         Fail   Should not be executed
+ 6 |     EXCEPT    Error
+   |
+
+invalid_try_except.robot:13:5 ERR01 Robot Framework syntax error: TRY branch cannot be empty.
+    |
+ 11 | TRY without body
+ 12 |     [Documentation]    FAIL    TRY branch cannot be empty.
+ 13 |     TRY
+    |     ^^^ ERR01
+ 14 |     EXCEPT    Error
+ 15 |         Fail   Should not be executed
+    |
+
+invalid_try_except.robot:22:5 ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+    |
+ 20 | TRY without EXCEPT or FINALLY
+ 21 |     [Documentation]    FAIL    TRY structure must have EXCEPT or FINALLY branch.
+ 22 |     TRY
+    |     ^^^ ERR01
+ 23 |         Fail   Should not be executed
+ 24 |     END
+    |
+
+invalid_try_except.robot:28:5 ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+    |
+ 26 | TRY with ELSE without EXCEPT or FINALLY
+ 27 |     [Documentation]    FAIL    TRY structure must have EXCEPT or FINALLY branch.
+ 28 |     TRY
+    |     ^^^ ERR01
+ 29 |         Fail   Should not be executed
+ 30 |     ELSE
+    |
+
+invalid_try_except.robot:36:5 ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
+    |
+ 34 | TRY with argument
+ 35 |     [Documentation]    FAIL    TRY does not accept arguments, got 'I should not be here'.
+ 36 |     TRY    I should not be here
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR01
+ 37 |         Fail   Should not be executed
+ 38 |     EXCEPT    Error
+    |
+
+invalid_try_except.robot:48:5 ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
+    |
+ 46 |     TRY
+ 47 |         Fail   Should not be executed
+ 48 |     EXCEPT    foo
+    |     ^^^^^^^^^^^^^ ERR01
+ 49 |     EXCEPT    Error
+ 50 |         Fail   Should not be executed
+    |
+
+invalid_try_except.robot:57:5 ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
+    |
+ 55 | Default EXCEPT not last
+ 56 |     [Documentation]    FAIL    EXCEPT without patterns must be last.
+ 57 |     TRY
+    |     ^^^ ERR01
+ 58 |         Fail   Should not be executed
+ 59 |     EXCEPT
+    |
+
+invalid_try_except.robot:69:5 ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
+    |
+ 67 | Multiple default EXCEPTs
+ 68 |     [Documentation]    FAIL    Only one EXCEPT without patterns allowed.
+ 69 |     TRY
+    |     ^^^ ERR01
+ 70 |         Fail   Should not be executed
+ 71 |     EXCEPT
+    |
+
+invalid_try_except.robot:83:5 ERR01 Robot Framework syntax error: EXCEPT AS requires a value.
+    |
+ 81 |     TRY
+ 82 |         Fail   Should not be executed
+ 83 |     EXCEPT    AS
+    |     ^^^^^^^^^^^^ ERR01
+ 84 |         Fail   Should not be executed
+ 85 |     END
+    |
+
+invalid_try_except.robot:91:5 ERR01 Robot Framework syntax error: EXCEPT AS accepts only one value.
+    |
+ 89 |     TRY
+ 90 |         Fail   Should not be executed
+ 91 |     EXCEPT    AS    foo    ${foo}
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR01
+ 92 |         Fail   Should not be executed
+ 93 |     END
+    |
+
+invalid_try_except.robot:99:5 ERR01 Robot Framework syntax error: EXCEPT AS variable 'foo' is invalid.
+    |
+ 97 |     TRY
+ 98 |         Fail   Should not be executed
+ 99 |     EXCEPT    AS    foo
+    |     ^^^^^^^^^^^^^^^^^^^ ERR01
+100 |         Fail   Should not be executed
+101 |     END
+    |
+
+invalid_try_except.robot:109:5 ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
+     |
+ 107 |     EXCEPT    Error
+ 108 |         Fail   Should not be executed
+ 109 |     ELSE    I should not be here
+     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR01
+ 110 |         Fail   Should not be executed
+ 111 |     FINALLY
+     |
+
+invalid_try_except.robot:121:5 ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
+     |
+ 119 |     EXCEPT    Error
+ 120 |         Fail   Should not be executed
+ 121 |     ELSE
+     |     ^^^^ ERR01
+ 122 |     FINALLY
+ 123 |         Fail   Should not be executed
+     |
+
+invalid_try_except.robot:128:5 ERR01 Robot Framework syntax error: Only one ELSE allowed.
+     |
+ 126 | Multiple ELSE blocks
+ 127 |     [Documentation]    FAIL    Only one ELSE allowed.
+ 128 |     TRY
+     |     ^^^ ERR01
+ 129 |         Fail   Should not be executed
+ 130 |     EXCEPT    Error
+     |
+
+invalid_try_except.robot:146:5 ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
+     |
+ 144 |     EXCEPT    Error
+ 145 |         Fail   Should not be executed
+ 146 |     FINALLY    ooops    i    did    it    again
+     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR01
+ 147 |         Fail   Should not be executed
+ 148 |     END
+     |
+
+invalid_try_except.robot:154:5 ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
+     |
+ 152 |     TRY
+ 153 |         Fail   Should not be executed
+ 154 |     FINALLY
+     |     ^^^^^^^ ERR01
+ 155 |     END
+     |
+
+invalid_try_except.robot:159:5 ERR01 Robot Framework syntax error: Only one FINALLY allowed.
+     |
+ 157 | Multiple FINALLY blocks
+ 158 |     [Documentation]    FAIL    Only one FINALLY allowed.
+ 159 |     TRY
+     |     ^^^ ERR01
+ 160 |         Fail   Should not be executed
+ 161 |     EXCEPT    Error
+     |
+
+invalid_try_except.robot:171:5 ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
+     |
+ 169 | ELSE before EXCEPT
+ 170 |     [Documentation]    FAIL    EXCEPT not allowed after ELSE.
+ 171 |     TRY
+     |     ^^^ ERR01
+ 172 |         Fail   Should not be executed
+ 173 |     EXCEPT    Error
+     |
+
+invalid_try_except.robot:185:5 ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
+     |
+ 183 | FINALLY before EXCEPT
+ 184 |     [Documentation]    FAIL    EXCEPT not allowed after FINALLY.
+ 185 |     TRY
+     |     ^^^ ERR01
+ 186 |         Fail   Should not be executed
+ 187 |     EXCEPT    Error
+     |
+
+invalid_try_except.robot:197:5 ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
+     |
+ 195 | FINALLY before ELSE
+ 196 |     [Documentation]    FAIL    ELSE not allowed after FINALLY.
+ 197 |     TRY
+     |     ^^^ ERR01
+ 198 |         Fail   Should not be executed
+ 199 |     EXCEPT    Error
+     |
+
+invalid_try_except.robot:210:5 ERR01 Robot Framework syntax error: TRY does not support templates.
+     |
+ 208 |     [Documentation]    FAIL    Templates cannot be used with TRY.
+ 209 |     [Template]    Log many
+ 210 |     TRY
+     |     ^^^ ERR01
+ 211 |         Fail   Should not be executed
+ 212 |     EXCEPT    Error
+     |
+
+invalid_try_except.robot:220:9 ERR01 Robot Framework syntax error: TRY does not support templates.
+     |
+ 218 |     [Template]    Log many
+ 219 |     IF    True
+ 220 |         TRY
+     |         ^^^ ERR01
+ 221 |             Fail   Should not be executed
+ 222 |         EXCEPT    Error
+     |
+
+invalid_try_except.robot:233:5 ERR01 Robot Framework syntax error: TRY must have closing END.
+     |
+ 231 |     ...    - Templates cannot be used with TRY.
+ 232 |     [Template]    Log many
+ 233 |     TRY
+     |     ^^^ ERR01
+ 234 |         IF    True
+ 235 |             Fail    Should not be executed
+     |
+
+invalid_try_except.robot:233:5 ERR01 Robot Framework syntax error: TRY does not support templates.
+     |
+ 231 |     ...    - Templates cannot be used with TRY.
+ 232 |     [Template]    Log many
+ 233 |     TRY
+     |     ^^^ ERR01
+ 234 |         IF    True
+ 235 |             Fail    Should not be executed
+     |
+
+invalid_try_except.robot:246:53 ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
+     |
+ 244 |             No Operation
+ 245 |         FINALLY
+ 246 |             BREAK
+     |             ^^^^^ ERR01
+ 247 |         END
+ 248 |     END
+     |
+
+invalid_try_except.robot:256:53 ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
+     |
+ 254 |             No Operation
+ 255 |         FINALLY
+ 256 |             CONTINUE
+     |             ^^^^^^^^ ERR01
+ 257 |         END
+ 258 |     END
+     |
+
+invalid_try_except.robot:269:9 ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
+     |
+ 267 |         No Operation
+ 268 |     FINALLY
+ 269 |         RETURN
+     |         ^^^^^^ ERR01
+ 270 |     END
+     |
+
+invalid_while.robot:10:5 ERR01 Robot Framework syntax error: WHILE accepts only one condition, got 3 conditions 'Too', 'many' and '!'.
+    |
+  8 | Multiple conditions
+  9 |     [Documentation]    FAIL WHILE cannot have more than one condition.
+ 10 |     WHILE    Too    many    !
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ ERR01
+ 11 |         Fail    Not executed!
+ 12 |     END
+    |
+
+invalid_while.robot:16:5 ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
+    |
+ 14 | No body
+ 15 |     [Documentation]    FAIL WHILE loop cannot be empty.
+ 16 |     WHILE    True
+    |     ^^^^^^^^^^^^^ ERR01
+ 17 |     END
+    |
+
+invalid_while.robot:21:5 ERR01 Robot Framework syntax error: WHILE loop must have closing END.
+    |
+ 19 | No END
+ 20 |     [Documentation]    FAIL WHILE loop must have closing END.
+ 21 |     WHILE    True
+    |     ^^^^^^^^^^^^^ ERR01
+ 22 |         Fail    Not executed!
+    |
+
+positional_args.robot:3:32 ERR01 Robot Framework syntax error: Positional argument '${arg2}' follows named argument
+   |
+ 1 | *** Keywords ***
+ 2 | Keyword
+ 3 |     [Arguments]    ${arg}=3    ${arg2}    ${arg3}  # invalid
+   |                                ^^^^^^^ ERR01
+ 4 |     Log  ${arg}
+ 5 |     Log  ${arg2}
+   |
+
+positional_args.robot:3:43 ERR01 Robot Framework syntax error: Positional argument '${arg3}' follows named argument
+   |
+ 1 | *** Keywords ***
+ 2 | Keyword
+ 3 |     [Arguments]    ${arg}=3    ${arg2}    ${arg3}  # invalid
+   |                                           ^^^^^^^ ERR01
+ 4 |     Log  ${arg}
+ 5 |     Log  ${arg2}
+   |
+
+positional_args.robot:8:32 ERR01 Robot Framework syntax error: Positional argument '${arg2}' follows named argument
+   |
+ 6 |
+ 7 | Keyword With Mixed Arguments
+ 8 |     [Arguments]    ${arg}=3    ${arg2}     ${arg4}=5    ${arg1}
+   |                                ^^^^^^^ ERR01
+ 9 |     No Operation
+   |
+
+positional_args.robot:8:57 ERR01 Robot Framework syntax error: Positional argument '${arg1}' follows named argument
+   |
+ 6 |
+ 7 | Keyword With Mixed Arguments
+ 8 |     [Arguments]    ${arg}=3    ${arg2}     ${arg4}=5    ${arg1}
+   |                                                         ^^^^^^^ ERR01
+ 9 |     No Operation
+   |
+
+positional_args.robot:12:29 ERR01 Robot Framework syntax error: Positional argument '@{args}' follows named argument
+    |
+ 10 |
+ 11 | Keyword With Kwargs
+ 12 |     [Arguments]  &{kwargs}  @{args}  ${arg}
+    |                             ^^^^^^^ ERR01
+ 13 |     No Operation
+    |
+
+positional_args.robot:12:38 ERR01 Robot Framework syntax error: Positional argument '${arg}' follows named argument
+    |
+ 10 |
+ 11 | Keyword With Kwargs
+ 12 |     [Arguments]  &{kwargs}  @{args}  ${arg}
+    |                                      ^^^^^^ ERR01
+ 13 |     No Operation
+    |
+
+variable_errors.robot:5:1 ERR01 Robot Framework syntax error: Invalid variable name 'value'.
+   |
+ 3 | ... val
+ 4 |  .... val
+ 5 | value
+   | ^ ERR01
+   |
+
+variable_errors.robot:7:1 ERR01 Robot Framework syntax error: Invalid dictionary variable item '1'. Items must use 'name=value' syntax or be dictionary variables themselves.
+   |
+ 7 | &{dict}    1
+   | ^^^^^^ ERR01
+   |
+
diff --git a/tests/linter/rules/errors/parsing_error/expected_output.txt b/tests/linter/rules/errors/parsing_error/expected_output.txt
index 05d48bd..a09b5f2 100644
--- a/tests/linter/rules/errors/parsing_error/expected_output.txt
+++ b/tests/linter/rules/errors/parsing_error/expected_output.txt
@@ -6,30 +6,30 @@ positional_args.robot:8:32 [E] ERR01 Robot Framework syntax error: Positional ar
 positional_args.robot:8:57 [E] ERR01 Robot Framework syntax error: Positional argument '${arg1}' follows named argument
 positional_args.robot:12:29 [E] ERR01 Robot Framework syntax error: Positional argument '@{args}' follows named argument
 positional_args.robot:12:38 [E] ERR01 Robot Framework syntax error: Positional argument '${arg}' follows named argument
-invalid_try_except.robot:4:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:13:1 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
-invalid_try_except.robot:22:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:28:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:36:1 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:48:1 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
-invalid_try_except.robot:57:1 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
-invalid_try_except.robot:69:1 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
-invalid_try_except.robot:83:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS requires variable.
-invalid_try_except.robot:91:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS accepts only one variable.
-invalid_try_except.robot:99:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS variable 'foo' is invalid.
-invalid_try_except.robot:109:1 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:121:1 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
-invalid_try_except.robot:128:1 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
-invalid_try_except.robot:146:1 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
-invalid_try_except.robot:154:1 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
-invalid_try_except.robot:159:1 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
-invalid_try_except.robot:171:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
-invalid_try_except.robot:185:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
-invalid_try_except.robot:197:1 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
-invalid_try_except.robot:233:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:246:1 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
-invalid_try_except.robot:256:1 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
-invalid_try_except.robot:269:1 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
-invalid_while.robot:10:1 [E] ERR01 Robot Framework syntax error: WHILE loop cannot have more than one condition, got 'Too', 'many' and '!'.
-invalid_while.robot:16:1 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
-invalid_while.robot:21:1 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
+invalid_try_except.robot:4:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:13:5 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
+invalid_try_except.robot:22:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:28:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:36:5 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:48:5 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
+invalid_try_except.robot:57:5 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
+invalid_try_except.robot:69:5 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
+invalid_try_except.robot:83:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS requires variable.
+invalid_try_except.robot:91:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS accepts only one variable.
+invalid_try_except.robot:99:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS variable 'foo' is invalid.
+invalid_try_except.robot:109:5 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:121:5 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
+invalid_try_except.robot:128:5 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
+invalid_try_except.robot:146:5 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
+invalid_try_except.robot:154:5 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
+invalid_try_except.robot:159:5 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
+invalid_try_except.robot:171:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
+invalid_try_except.robot:185:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
+invalid_try_except.robot:197:5 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
+invalid_try_except.robot:233:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:246:13 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
+invalid_try_except.robot:256:13 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
+invalid_try_except.robot:269:9 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
+invalid_while.robot:10:5 [E] ERR01 Robot Framework syntax error: WHILE loop cannot have more than one condition, got 'Too', 'many' and '!'.
+invalid_while.robot:16:5 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
+invalid_while.robot:21:5 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
diff --git a/tests/linter/rules/errors/parsing_error/expected_output_rf5.txt b/tests/linter/rules/errors/parsing_error/expected_output_rf5.txt
index 6099c7f..afb7aa7 100644
--- a/tests/linter/rules/errors/parsing_error/expected_output_rf5.txt
+++ b/tests/linter/rules/errors/parsing_error/expected_output_rf5.txt
@@ -6,33 +6,33 @@ positional_args.robot:8:32 [E] ERR01 Robot Framework syntax error: Positional ar
 positional_args.robot:8:57 [E] ERR01 Robot Framework syntax error: Positional argument '${arg1}' follows named argument
 positional_args.robot:12:29 [E] ERR01 Robot Framework syntax error: Positional argument '@{args}' follows named argument
 positional_args.robot:12:38 [E] ERR01 Robot Framework syntax error: Positional argument '${arg}' follows named argument
-invalid_try_except.robot:4:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:13:1 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
-invalid_try_except.robot:22:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:28:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:36:1 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:48:1 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
-invalid_try_except.robot:57:1 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
-invalid_try_except.robot:69:1 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
-invalid_try_except.robot:83:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS requires variable.
-invalid_try_except.robot:91:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS accepts only one variable.
-invalid_try_except.robot:99:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS variable 'foo' is invalid.
-invalid_try_except.robot:109:1 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:121:1 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
-invalid_try_except.robot:128:1 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
-invalid_try_except.robot:146:1 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
-invalid_try_except.robot:154:1 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
-invalid_try_except.robot:159:1 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
-invalid_try_except.robot:171:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
-invalid_try_except.robot:185:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
-invalid_try_except.robot:197:1 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
-invalid_try_except.robot:233:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:246:1 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
-invalid_try_except.robot:256:1 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
-invalid_try_except.robot:269:1 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
+invalid_try_except.robot:4:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:13:5 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
+invalid_try_except.robot:22:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:28:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:36:5 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:48:5 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
+invalid_try_except.robot:57:5 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
+invalid_try_except.robot:69:5 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
+invalid_try_except.robot:83:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS requires variable.
+invalid_try_except.robot:91:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS accepts only one variable.
+invalid_try_except.robot:99:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS variable 'foo' is invalid.
+invalid_try_except.robot:109:5 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:121:5 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
+invalid_try_except.robot:128:5 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
+invalid_try_except.robot:146:5 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
+invalid_try_except.robot:154:5 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
+invalid_try_except.robot:159:5 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
+invalid_try_except.robot:171:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
+invalid_try_except.robot:185:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
+invalid_try_except.robot:197:5 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
+invalid_try_except.robot:233:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:246:13 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
+invalid_try_except.robot:256:13 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
+invalid_try_except.robot:269:9 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
 invalid_while.robot:4:1 [E] ERR01 Robot Framework syntax error: WHILE must have a condition.
-invalid_while.robot:10:1 [E] ERR01 Robot Framework syntax error: WHILE cannot have more than one condition.
-invalid_while.robot:16:1 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
-invalid_while.robot:21:1 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
+invalid_while.robot:10:5 [E] ERR01 Robot Framework syntax error: WHILE cannot have more than one condition.
+invalid_while.robot:16:5 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
+invalid_while.robot:21:5 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
 resource_with_test_lang.resource:7:1 [E] ERR01 Robot Framework syntax error: Unrecognized section header '*** Ustawienia ***'. Valid sections: 'Settings', 'Variables', 'Keywords' and 'Comments'.
 resource_with_test_lang.resource:3:1 [E] ERR01 Robot Framework syntax error: Unrecognized section header '*** Przypadki Testowe ***'. Valid sections: 'Settings', 'Variables', 'Keywords' and 'Comments'.
\ No newline at end of file
diff --git a/tests/linter/rules/errors/parsing_error/expected_output_rf6.txt b/tests/linter/rules/errors/parsing_error/expected_output_rf6.txt
index 808deb1..a08bb22 100644
--- a/tests/linter/rules/errors/parsing_error/expected_output_rf6.txt
+++ b/tests/linter/rules/errors/parsing_error/expected_output_rf6.txt
@@ -6,31 +6,31 @@ positional_args.robot:8:32 [E] ERR01 Robot Framework syntax error: Positional ar
 positional_args.robot:8:57 [E] ERR01 Robot Framework syntax error: Positional argument '${arg1}' follows named argument
 positional_args.robot:12:29 [E] ERR01 Robot Framework syntax error: Positional argument '@{args}' follows named argument
 positional_args.robot:12:38 [E] ERR01 Robot Framework syntax error: Positional argument '${arg}' follows named argument
-invalid_try_except.robot:4:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:13:1 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
-invalid_try_except.robot:22:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:28:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:36:1 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:48:1 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
-invalid_try_except.robot:57:1 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
-invalid_try_except.robot:69:1 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
-invalid_try_except.robot:83:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS requires variable.
-invalid_try_except.robot:91:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS accepts only one variable.
-invalid_try_except.robot:99:1 [E] ERR01 Robot Framework syntax error: EXCEPT's AS variable 'foo' is invalid.
-invalid_try_except.robot:109:1 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:121:1 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
-invalid_try_except.robot:128:1 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
-invalid_try_except.robot:146:1 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
-invalid_try_except.robot:154:1 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
-invalid_try_except.robot:159:1 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
-invalid_try_except.robot:171:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
-invalid_try_except.robot:185:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
-invalid_try_except.robot:197:1 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
-invalid_try_except.robot:233:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:246:1 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
-invalid_try_except.robot:256:1 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
-invalid_try_except.robot:269:1 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
+invalid_try_except.robot:4:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:13:5 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
+invalid_try_except.robot:22:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:28:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:36:5 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:48:5 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
+invalid_try_except.robot:57:5 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
+invalid_try_except.robot:69:5 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
+invalid_try_except.robot:83:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS requires variable.
+invalid_try_except.robot:91:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS accepts only one variable.
+invalid_try_except.robot:99:5 [E] ERR01 Robot Framework syntax error: EXCEPT's AS variable 'foo' is invalid.
+invalid_try_except.robot:109:5 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:121:5 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
+invalid_try_except.robot:128:5 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
+invalid_try_except.robot:146:5 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
+invalid_try_except.robot:154:5 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
+invalid_try_except.robot:159:5 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
+invalid_try_except.robot:171:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
+invalid_try_except.robot:185:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
+invalid_try_except.robot:197:5 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
+invalid_try_except.robot:233:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:246:13 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
+invalid_try_except.robot:256:13 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
+invalid_try_except.robot:269:9 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
 invalid_while.robot:4:1 [E] ERR01 Robot Framework syntax error: WHILE must have a condition.
-invalid_while.robot:10:1 [E] ERR01 Robot Framework syntax error: WHILE cannot have more than one condition.
-invalid_while.robot:16:1 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
-invalid_while.robot:21:1 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
+invalid_while.robot:10:5 [E] ERR01 Robot Framework syntax error: WHILE cannot have more than one condition.
+invalid_while.robot:16:5 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
+invalid_while.robot:21:5 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
diff --git a/tests/linter/rules/errors/parsing_error/expected_output_rf7_1.txt b/tests/linter/rules/errors/parsing_error/expected_output_rf7_1.txt
index b476995..864e561 100644
--- a/tests/linter/rules/errors/parsing_error/expected_output_rf7_1.txt
+++ b/tests/linter/rules/errors/parsing_error/expected_output_rf7_1.txt
@@ -6,30 +6,30 @@ positional_args.robot:8:32 [E] ERR01 Robot Framework syntax error: Positional ar
 positional_args.robot:8:57 [E] ERR01 Robot Framework syntax error: Positional argument '${arg1}' follows named argument
 positional_args.robot:12:29 [E] ERR01 Robot Framework syntax error: Positional argument '@{args}' follows named argument
 positional_args.robot:12:38 [E] ERR01 Robot Framework syntax error: Positional argument '${arg}' follows named argument
-invalid_try_except.robot:4:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:13:1 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
-invalid_try_except.robot:22:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:28:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:36:1 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:48:1 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
-invalid_try_except.robot:57:1 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
-invalid_try_except.robot:69:1 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
-invalid_try_except.robot:83:1 [E] ERR01 Robot Framework syntax error: EXCEPT AS requires a value.
-invalid_try_except.robot:91:1 [E] ERR01 Robot Framework syntax error: EXCEPT AS accepts only one value.
-invalid_try_except.robot:99:1 [E] ERR01 Robot Framework syntax error: EXCEPT AS variable 'foo' is invalid.
-invalid_try_except.robot:109:1 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:121:1 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
-invalid_try_except.robot:128:1 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
-invalid_try_except.robot:146:1 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
-invalid_try_except.robot:154:1 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
-invalid_try_except.robot:159:1 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
-invalid_try_except.robot:171:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
-invalid_try_except.robot:185:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
-invalid_try_except.robot:197:1 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
-invalid_try_except.robot:233:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:246:1 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
-invalid_try_except.robot:256:1 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
-invalid_try_except.robot:269:1 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
-invalid_while.robot:10:1 [E] ERR01 Robot Framework syntax error: WHILE accepts only one condition, got 3 conditions 'Too', 'many' and '!'.
-invalid_while.robot:16:1 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
-invalid_while.robot:21:1 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
+invalid_try_except.robot:4:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:13:5 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
+invalid_try_except.robot:22:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:28:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:36:5 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:48:5 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
+invalid_try_except.robot:57:5 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
+invalid_try_except.robot:69:5 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
+invalid_try_except.robot:83:5 [E] ERR01 Robot Framework syntax error: EXCEPT AS requires a value.
+invalid_try_except.robot:91:5 [E] ERR01 Robot Framework syntax error: EXCEPT AS accepts only one value.
+invalid_try_except.robot:99:5 [E] ERR01 Robot Framework syntax error: EXCEPT AS variable 'foo' is invalid.
+invalid_try_except.robot:109:5 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:121:5 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
+invalid_try_except.robot:128:5 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
+invalid_try_except.robot:146:5 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
+invalid_try_except.robot:154:5 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
+invalid_try_except.robot:159:5 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
+invalid_try_except.robot:171:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
+invalid_try_except.robot:185:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
+invalid_try_except.robot:197:5 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
+invalid_try_except.robot:233:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:246:13 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
+invalid_try_except.robot:256:13 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
+invalid_try_except.robot:269:9 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
+invalid_while.robot:10:5 [E] ERR01 Robot Framework syntax error: WHILE accepts only one condition, got 3 conditions 'Too', 'many' and '!'.
+invalid_while.robot:16:5 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
+invalid_while.robot:21:5 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
diff --git a/tests/linter/rules/errors/parsing_error/expected_output_rf7_2.txt b/tests/linter/rules/errors/parsing_error/expected_output_rf7_2.txt
index 0aebb84..47a4b5a 100644
--- a/tests/linter/rules/errors/parsing_error/expected_output_rf7_2.txt
+++ b/tests/linter/rules/errors/parsing_error/expected_output_rf7_2.txt
@@ -6,33 +6,33 @@ positional_args.robot:8:32 [E] ERR01 Robot Framework syntax error: Positional ar
 positional_args.robot:8:57 [E] ERR01 Robot Framework syntax error: Positional argument '${arg1}' follows named argument
 positional_args.robot:12:29 [E] ERR01 Robot Framework syntax error: Positional argument '@{args}' follows named argument
 positional_args.robot:12:38 [E] ERR01 Robot Framework syntax error: Positional argument '${arg}' follows named argument
-invalid_try_except.robot:4:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:13:1 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
-invalid_try_except.robot:22:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:28:1 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
-invalid_try_except.robot:36:1 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:48:1 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
-invalid_try_except.robot:57:1 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
-invalid_try_except.robot:69:1 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
-invalid_try_except.robot:83:1 [E] ERR01 Robot Framework syntax error: EXCEPT AS requires a value.
-invalid_try_except.robot:91:1 [E] ERR01 Robot Framework syntax error: EXCEPT AS accepts only one value.
-invalid_try_except.robot:99:1 [E] ERR01 Robot Framework syntax error: EXCEPT AS variable 'foo' is invalid.
-invalid_try_except.robot:109:1 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
-invalid_try_except.robot:121:1 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
-invalid_try_except.robot:128:1 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
-invalid_try_except.robot:146:1 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
-invalid_try_except.robot:154:1 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
-invalid_try_except.robot:159:1 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
-invalid_try_except.robot:171:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
-invalid_try_except.robot:185:1 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
-invalid_try_except.robot:197:1 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
+invalid_try_except.robot:4:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:13:5 [E] ERR01 Robot Framework syntax error: TRY branch cannot be empty.
+invalid_try_except.robot:22:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:28:5 [E] ERR01 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch.
+invalid_try_except.robot:36:5 [E] ERR01 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:48:5 [E] ERR01 Robot Framework syntax error: EXCEPT branch cannot be empty.
+invalid_try_except.robot:57:5 [E] ERR01 Robot Framework syntax error: EXCEPT without patterns must be last.
+invalid_try_except.robot:69:5 [E] ERR01 Robot Framework syntax error: Only one EXCEPT without patterns allowed.
+invalid_try_except.robot:83:5 [E] ERR01 Robot Framework syntax error: EXCEPT AS requires a value.
+invalid_try_except.robot:91:5 [E] ERR01 Robot Framework syntax error: EXCEPT AS accepts only one value.
+invalid_try_except.robot:99:5 [E] ERR01 Robot Framework syntax error: EXCEPT AS variable 'foo' is invalid.
+invalid_try_except.robot:109:5 [E] ERR01 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'.
+invalid_try_except.robot:121:5 [E] ERR01 Robot Framework syntax error: ELSE branch cannot be empty.
+invalid_try_except.robot:128:5 [E] ERR01 Robot Framework syntax error: Only one ELSE allowed.
+invalid_try_except.robot:146:5 [E] ERR01 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'.
+invalid_try_except.robot:154:5 [E] ERR01 Robot Framework syntax error: FINALLY branch cannot be empty.
+invalid_try_except.robot:159:5 [E] ERR01 Robot Framework syntax error: Only one FINALLY allowed.
+invalid_try_except.robot:171:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after ELSE.
+invalid_try_except.robot:185:5 [E] ERR01 Robot Framework syntax error: EXCEPT not allowed after FINALLY.
+invalid_try_except.robot:197:5 [E] ERR01 Robot Framework syntax error: ELSE not allowed after FINALLY.
 invalid_try_except.robot:210:1 [E] ERR01 Robot Framework syntax error: TRY does not support templates.
 invalid_try_except.robot:220:1 [E] ERR01 Robot Framework syntax error: TRY does not support templates.
-invalid_try_except.robot:233:1 [E] ERR01 Robot Framework syntax error: TRY does not support templates.
-invalid_try_except.robot:233:1 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
-invalid_try_except.robot:246:1 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
-invalid_try_except.robot:256:1 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
-invalid_try_except.robot:269:1 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
-invalid_while.robot:10:1 [E] ERR01 Robot Framework syntax error: WHILE accepts only one condition, got 3 conditions 'Too', 'many' and '!'.
-invalid_while.robot:16:1 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
-invalid_while.robot:21:1 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
+invalid_try_except.robot:233:5 [E] ERR01 Robot Framework syntax error: TRY does not support templates.
+invalid_try_except.robot:233:5 [E] ERR01 Robot Framework syntax error: TRY must have closing END.
+invalid_try_except.robot:246:13 [E] ERR01 Robot Framework syntax error: BREAK cannot be used in FINALLY branch.
+invalid_try_except.robot:256:13 [E] ERR01 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch.
+invalid_try_except.robot:269:9 [E] ERR01 Robot Framework syntax error: RETURN cannot be used in FINALLY branch.
+invalid_while.robot:10:5 [E] ERR01 Robot Framework syntax error: WHILE accepts only one condition, got 3 conditions 'Too', 'many' and '!'.
+invalid_while.robot:16:5 [E] ERR01 Robot Framework syntax error: WHILE loop cannot be empty.
+invalid_while.robot:21:5 [E] ERR01 Robot Framework syntax error: WHILE loop must have closing END.
\ No newline at end of file
diff --git a/tests/linter/rules/errors/parsing_error/test_rule.py b/tests/linter/rules/errors/parsing_error/test_rule.py
index 22e0af4..74c763b 100644
--- a/tests/linter/rules/errors/parsing_error/test_rule.py
+++ b/tests/linter/rules/errors/parsing_error/test_rule.py
@@ -22,3 +22,6 @@ class TestRule(RuleAcceptance):
 
     def test_rule_rf3(self):
         self.check_rule(expected_file="expected_output_rf3.txt", test_on_version="==3.2.2")
+
+    def test_extended(self):
+        self.check_rule(expected_file="expected_extended.txt", output_format="extended", test_on_version=">=7.2")
diff --git a/tests/linter/rules/errors/return_in_test_case/expected_extended.txt b/tests/linter/rules/errors/return_in_test_case/expected_extended.txt
new file mode 100644
index 0000000..13bf5fd
--- /dev/null
+++ b/tests/linter/rules/errors/return_in_test_case/expected_extended.txt
@@ -0,0 +1,90 @@
+test.robot:3:5 ERR14 RETURN can only be used inside a user keyword
+   |
+ 1 | *** Test Cases ***
+ 2 | RETURN
+ 3 |     RETURN
+   |     ^^^^^^ ERR14
+ 4 |     IF    $var
+ 5 |         RETURN
+   |
+
+test.robot:5:9 ERR14 RETURN can only be used inside a user keyword
+   |
+ 3 |     RETURN
+ 4 |     IF    $var
+ 5 |         RETURN
+   |         ^^^^^^ ERR14
+ 6 |     ELSE
+ 7 |         RETURN
+   |
+
+test.robot:7:9 ERR14 RETURN can only be used inside a user keyword
+   |
+ 5 |         RETURN
+ 6 |     ELSE
+ 7 |         RETURN
+   |         ^^^^^^ ERR14
+ 8 |     END
+ 9 |     IF    $var    RETURN
+   |
+
+test.robot:9:19 ERR14 RETURN can only be used inside a user keyword
+   |
+ 7 |         RETURN
+ 8 |     END
+ 9 |     IF    $var    RETURN
+   |                   ^^^^^^ ERR14
+10 |     WHILE    $condition
+11 |         RETURN
+   |
+
+test.robot:11:9 ERR14 RETURN can only be used inside a user keyword
+    |
+  9 |     IF    $var    RETURN
+ 10 |     WHILE    $condition
+ 11 |         RETURN
+    |         ^^^^^^ ERR14
+ 12 |     END
+ 13 |     FOR    ${var}  IN  1  2
+    |
+
+test.robot:14:9 ERR14 RETURN can only be used inside a user keyword
+    |
+ 12 |     END
+ 13 |     FOR    ${var}  IN  1  2
+ 14 |         RETURN
+    |         ^^^^^^ ERR14
+ 15 |     END
+ 16 |     TRY
+    |
+
+test.robot:17:9 ERR14 RETURN can only be used inside a user keyword
+    |
+ 15 |     END
+ 16 |     TRY
+ 17 |         RETURN
+    |         ^^^^^^ ERR14
+ 18 |     EXCEPT
+ 19 |         RETURN
+    |
+
+test.robot:19:9 ERR14 RETURN can only be used inside a user keyword
+    |
+ 17 |         RETURN
+ 18 |     EXCEPT
+ 19 |         RETURN
+    |         ^^^^^^ ERR14
+ 20 |     END
+ 21 |     GROUP
+    |
+
+test.robot:22:9 ERR14 RETURN can only be used inside a user keyword
+    |
+ 20 |     END
+ 21 |     GROUP
+ 22 |         RETURN
+    |         ^^^^^^ ERR14
+ 23 |     END
+ 24 |     [Return]
+    |
+
diff --git a/tests/linter/rules/errors/return_in_test_case/test_rule.py b/tests/linter/rules/errors/return_in_test_case/test_rule.py
index 612e3c0..53c3c9a 100644
--- a/tests/linter/rules/errors/return_in_test_case/test_rule.py
+++ b/tests/linter/rules/errors/return_in_test_case/test_rule.py
@@ -4,3 +4,6 @@ from tests.linter.utils import RuleAcceptance
 class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt", test_on_version=">=5")
+
+    def test_extended(self):
+        self.check_rule(src_files=["test.robot"], expected_file="expected_extended.txt", output_format="extended")
diff --git a/tests/linter/rules/errors/setting_not_supported/expected_extended.txt b/tests/linter/rules/errors/setting_not_supported/expected_extended.txt
new file mode 100644
index 0000000..47d1649
--- /dev/null
+++ b/tests/linter/rules/errors/setting_not_supported/expected_extended.txt
@@ -0,0 +1,25 @@
+test.robot:12:5 ERR09 Setting '[Arguments]' is not supported in Test Case. Allowed are: [Documentation], [Tags], [Setup], [Teardown], [Template], [Timeout]
+    |
+ 10 | *** Test Case ***
+ 11 |     [Invalid]  arg
+ 12 |     [Arguments]  ${arg}
+    |     ^^^^^^^^^^^ ERR09
+ 13 |     [Return]    ${value}
+    |
+
+test.robot:13:5 ERR09 Setting '[Return]' is not supported in Test Case. Allowed are: [Documentation], [Tags], [Setup], [Teardown], [Template], [Timeout]
+    |
+ 11 |     [Invalid]  arg
+ 12 |     [Arguments]  ${arg}
+ 13 |     [Return]    ${value}
+    |     ^^^^^^^^ ERR09
+    |
+
+test.robot:18:5 ERR09 Setting '[Template]' is not supported in Keyword. Allowed are: [Documentation], [Tags], [Arguments], [Return], [Teardown], [Timeout]
+    |
+ 16 |     [Invalid]    arg
+ 17 |     [Setup]    ${arg}
+ 18 |     [Template]    Keyword
+    |     ^^^^^^^^^^ ERR09
+    |
+
diff --git a/tests/linter/rules/errors/setting_not_supported/test_rule.py b/tests/linter/rules/errors/setting_not_supported/test_rule.py
index 3084ef2..8bab913 100644
--- a/tests/linter/rules/errors/setting_not_supported/test_rule.py
+++ b/tests/linter/rules/errors/setting_not_supported/test_rule.py
@@ -3,7 +3,15 @@ from tests.linter.utils import RuleAcceptance
 
 class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
-        self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt", test_on_version=[">=7.0"])
+        self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt", test_on_version=">=7.0")
 
     def test_pre_rf7(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output_pre7.txt", test_on_version="<7.0")
+
+    def test_extended(self):
+        self.check_rule(
+            src_files=["test.robot"],
+            expected_file="expected_extended.txt",
+            output_format="extended",
+            test_on_version=">=7.0",
+        )
diff --git a/tests/linter/rules/errors/unsupported_setting_in_init_file/expected_extended.txt b/tests/linter/rules/errors/unsupported_setting_in_init_file/expected_extended.txt
new file mode 100644
index 0000000..cd7b53e
--- /dev/null
+++ b/tests/linter/rules/errors/unsupported_setting_in_init_file/expected_extended.txt
@@ -0,0 +1,36 @@
+__init__.robot:2:1 ERR17 Setting 'Test Template' is not supported in initialization files
+   |
+ 1 | *** Settings ***
+ 2 | Test Template       template
+   | ^^^^^^^^^^^^^ ERR17
+ 3 | Default Tags        tag
+ 4 | Documentation       some documentation
+   |
+
+__init__.robot:3:1 ERR17 Setting 'Default Tags' is not supported in initialization files
+   |
+ 1 | *** Settings ***
+ 2 | Test Template       template
+ 3 | Default Tags        tag
+   | ^^^^^^^^^^^^ ERR17
+ 4 | Documentation       some documentation
+   |
+
+__init__.resource:2:1 ERR17 Setting 'Test Template' is not supported in initialization files
+   |
+ 1 | *** Settings ***
+ 2 | Test Template       Template
+   | ^^^^^^^^^^^^^ ERR17
+ 3 | Default Tags        tag
+ 4 | Documentation       some documentation
+   |
+
+__init__.resource:3:1 ERR17 Setting 'Default Tags' is not supported in initialization files
+   |
+ 1 | *** Settings ***
+ 2 | Test Template       Template
+ 3 | Default Tags        tag
+   | ^^^^^^^^^^^^ ERR17
+ 4 | Documentation       some documentation
+   |
+
diff --git a/tests/linter/rules/errors/unsupported_setting_in_init_file/test_rule.py b/tests/linter/rules/errors/unsupported_setting_in_init_file/test_rule.py
index 02d83f5..94d2fd4 100644
--- a/tests/linter/rules/errors/unsupported_setting_in_init_file/test_rule.py
+++ b/tests/linter/rules/errors/unsupported_setting_in_init_file/test_rule.py
@@ -16,3 +16,10 @@ class TestRuleAcceptance(RuleAcceptance):
             issue_format="end_col",
             test_on_version=">=6",
         )
+
+    def test_extended(self):
+        self.check_rule(
+            src_files=["__init__.robot", "__init__.resource", "test.robot"],
+            expected_file="expected_extended.txt",
+            output_format="extended",
+        )
diff --git a/tests/linter/rules/errors/variables_import_with_args/expected_extended.txt b/tests/linter/rules/errors/variables_import_with_args/expected_extended.txt
new file mode 100644
index 0000000..db01e90
--- /dev/null
+++ b/tests/linter/rules/errors/variables_import_with_args/expected_extended.txt
@@ -0,0 +1,20 @@
+test.robot:11:1 ERR04 YAML variable files do not take arguments
+    |
+  9 | Variables  other1.py    arg1
+ 10 | Variables  other1.py    arg1
+ 11 | Variables  vars.yaml    arg1
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERR04
+ 12 | Variables  vars.yaml
+ 13 | ...    arg1
+    |
+
+test.robot:12:1 ERR04 YAML variable files do not take arguments
+    |
+ 10 | Variables  other1.py    arg1
+ 11 | Variables  vars.yaml    arg1
+ 12 | Variables  vars.yaml
+    | ^^^^^^^^^^^^^^^^^^^^ ERR04
+ 13 | ...    arg1
+ 14 | Variables  vars2.yaml
+    |
+
diff --git a/tests/linter/rules/errors/variables_import_with_args/expected_output.txt b/tests/linter/rules/errors/variables_import_with_args/expected_output.txt
index b2d3896..544aea8 100644
--- a/tests/linter/rules/errors/variables_import_with_args/expected_output.txt
+++ b/tests/linter/rules/errors/variables_import_with_args/expected_output.txt
@@ -1,1 +1,2 @@
 test.robot:11:1 [E] ERR04 YAML variable files do not take arguments
+test.robot:12:1 [E] ERR04 YAML variable files do not take arguments
\ No newline at end of file
diff --git a/tests/linter/rules/errors/variables_import_with_args/test.robot b/tests/linter/rules/errors/variables_import_with_args/test.robot
index b80711e..35b6fb5 100644
--- a/tests/linter/rules/errors/variables_import_with_args/test.robot
+++ b/tests/linter/rules/errors/variables_import_with_args/test.robot
@@ -9,6 +9,8 @@ Variables  other.py    arg2
 Variables  other1.py    arg1
 Variables  other1.py    arg1
 Variables  vars.yaml    arg1
+Variables  vars.yaml
+...    arg1
 Variables  vars2.yaml
 Variables  vars2.yaml
 Variables  variables
diff --git a/tests/linter/rules/errors/variables_import_with_args/test_rule.py b/tests/linter/rules/errors/variables_import_with_args/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/errors/variables_import_with_args/test_rule.py
+++ b/tests/linter/rules/errors/variables_import_with_args/test_rule.py
@@ -4,3 +4,6 @@ from tests.linter.utils import RuleAcceptance
 class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt")
+
+    def test_extended(self):
+        self.check_rule(src_files=["test.robot"], expected_file="expected_extended.txt", output_format="extended")