Repository: MarketSquare/robotframework-robocop
Pull request #1271 (2025-03-01 16:10:08)

Add tests for extended view for lengths rules


Patch:
diff --git a/src/robocop/cli.py b/src/robocop/cli.py
index dca0889..a4bb987 100644
--- a/src/robocop/cli.py
+++ b/src/robocop/cli.py
@@ -433,7 +433,7 @@ def format_files(
 def list_rules(
     filter_category: Annotated[
         RuleFilter, typer.Option("--filter", case_sensitive=False, help="Filter rules by category.")
-    ] = RuleFilter.DEFAULT,
+    ] = RuleFilter.ALL,
     filter_pattern: Annotated[Optional[str], typer.Option("--pattern", help="Filter rules by pattern")] = None,
 ) -> None:
     """
@@ -450,7 +450,6 @@ def list_rules(
     Use `robocop rule rule_name` for more detailed information on the rule.
     The output list is affected by default configuration file (if it is found).
     """
-    # TODO: support list-configurables (maybe as separate robocop rule <>)
     # TODO: rich support (colorized enabled, severity etc)
     console = Console(soft_wrap=True)
     config_manager = config.ConfigManager()
@@ -514,6 +513,7 @@ def list_formatters(
 ) -> None:
     """List available formatters."""
     # We will need ConfigManager later for listing based on configuration
+    raise NotImplementedError("Command not yet implemented.")
 
 
 @app.command("docs")
diff --git a/src/robocop/linter/rules/lengths.py b/src/robocop/linter/rules/lengths.py
index 9646697..b94f3d3 100644
--- a/src/robocop/linter/rules/lengths.py
+++ b/src/robocop/linter/rules/lengths.py
@@ -157,6 +157,7 @@ class FileTooLongRule(Rule):
     rule_id = "LEN28"
     message = "File has too many lines ({lines_count}/{max_allowed_count})"
     severity = RuleSeverity.WARNING
+    file_wide_rule = True
     parameters = [
         RuleParam(name="max_lines", default=400, converter=int, desc="number of lines allowed in a file"),
     ]
@@ -588,13 +589,15 @@ class LengthChecker(VisitorChecker):
             if isinstance(child, Arguments):
                 args_number = len(child.values)
                 if args_number > self.too_many_arguments.max_args:
+                    name_token = child.data_tokens[0]
                     self.report(
                         self.too_many_arguments,
                         keyword_name=node.name,
                         arguments_count=args_number,
                         max_allowed_count=self.too_many_arguments.max_args,
-                        node=node,
-                        end_col=node.col_offset + len(node.name) + 1,
+                        node=name_token,
+                        end_lineno=child.end_lineno,
+                        end_col=child.end_col_offset + 1,
                         extended_disablers=(node.lineno, node.end_lineno),
                         sev_threshold_value=args_number,
                     )
@@ -718,6 +721,7 @@ class LineLengthChecker(RawFileChecker):
                 line_length=len(line),
                 allowed_length=self.line_too_long.line_length,
                 lineno=lineno,
+                col=self.line_too_long.line_length,
                 end_col=len(line) + 1,
                 sev_threshold_value=len(line),
             )
@@ -855,11 +859,11 @@ class EmptySettingsChecker(VisitorChecker):
 
     def visit_ResourceImport(self, node) -> None:  # noqa: N802
         if not node.name:
-            self.report(self.empty_resource_import, node=node, col=node.col_offset + 1)
+            self.report(self.empty_resource_import, node=node, col=node.col_offset + 1, end_col=node.end_col_offset)
 
     def visit_LibraryImport(self, node) -> None:  # noqa: N802
         if not node.name:
-            self.report(self.empty_library_import, node=node, col=node.col_offset + 1)
+            self.report(self.empty_library_import, node=node, col=node.col_offset + 1, end_col=node.end_col_offset)
 
     def visit_Setup(self, node) -> None:  # noqa: N802
         if not node.name:


Test patch:
diff --git a/tests/linter/cli/test_list_rules.py b/tests/linter/cli/test_list_rules.py
index 8ffaee5..7a67fb2 100644
--- a/tests/linter/cli/test_list_rules.py
+++ b/tests/linter/cli/test_list_rules.py
@@ -187,10 +187,11 @@ class TestListingRules:
             list_rules()
         out, _ = capsys.readouterr()
         assert (
-            out == "Rule - 0101 [W]: some-message: Some description (enabled)\n\n"
-            "Altogether 1 rule with following severity:\n"
+            out == "Rule - 0101 [W]: some-message: Some description (enabled)\n"
+            "Rule - 19999 [W]: non-default-rule: Some description (disabled)\n\n"
+            "Altogether 2 rules with following severity:\n"
             "    0 error rules,\n"
-            "    1 warning rule,\n"
+            "    2 warning rules,\n"
             "    0 info rules.\n\n"
             "Visit https://robocop.readthedocs.io/en/stable/rules_list.html page for detailed documentation.\n"
         )
diff --git a/tests/linter/rules/lengths/empty_arguments/expected_extended.txt b/tests/linter/rules/lengths/empty_arguments/expected_extended.txt
new file mode 100644
index 0000000..28575f7
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_arguments/expected_extended.txt
@@ -0,0 +1,10 @@
+test.robot:17:5 LEN26 Arguments of 'Keyword Without Arguments' Keyword are empty
+    |
+ 15 | Keyword Without Arguments
+ 16 |     [Documentation]  this is doc
+ 17 |     [Arguments]
+    |     ^^^^^^^^^^^^ LEN26
+ 18 |     No Operation
+ 19 |     Pass
+    |
+
diff --git a/tests/linter/rules/lengths/empty_arguments/test_rule.py b/tests/linter/rules/lengths/empty_arguments/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_arguments/test_rule.py
+++ b/tests/linter/rules/lengths/empty_arguments/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/lengths/empty_default_tags/expected_extended.txt b/tests/linter/rules/lengths/empty_default_tags/expected_extended.txt
new file mode 100644
index 0000000..b6946c3
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_default_tags/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN14 Default Tags are empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Default Tags
+   | ^^^^^^^^^^^^ LEN14
+   |
+
diff --git a/tests/linter/rules/lengths/empty_default_tags/test_rule.py b/tests/linter/rules/lengths/empty_default_tags/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_default_tags/test_rule.py
+++ b/tests/linter/rules/lengths/empty_default_tags/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/lengths/empty_documentation/expected_extended.txt b/tests/linter/rules/lengths/empty_documentation/expected_extended.txt
new file mode 100644
index 0000000..8b6d15b
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_documentation/expected_extended.txt
@@ -0,0 +1,27 @@
+test.robot:2:1 LEN12 Documentation of Test Suite is empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation
+   | ^^^^^^^^^^^^^ LEN12
+   |
+
+test.robot:7:5 LEN12 Documentation of 'Test' Test Case is empty
+   |
+ 5 | *** Test Cases ***
+ 6 | Test
+ 7 |     [Documentation]
+   |     ^^^^^^^^^^^^^^^ LEN12
+ 8 |     [Tags]  sometag
+ 9 |     Pass
+   |
+
+test.robot:16:5 LEN12 Documentation of 'Keyword' Keyword is empty
+    |
+ 14 | *** Keywords ***
+ 15 | Keyword
+ 16 |     [Documentation]
+    |     ^^^^^^^^^^^^^^^ LEN12
+ 17 |     No Operation
+ 18 |     Pass
+    |
+
diff --git a/tests/linter/rules/lengths/empty_documentation/test_rule.py b/tests/linter/rules/lengths/empty_documentation/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_documentation/test_rule.py
+++ b/tests/linter/rules/lengths/empty_documentation/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/lengths/empty_force_tags/expected_extended.txt b/tests/linter/rules/lengths/empty_force_tags/expected_extended.txt
new file mode 100644
index 0000000..8ed3504
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_force_tags/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN13 Force Tags are empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Force Tags
+   | ^^^^^^^^^^ LEN13
+   |
+
diff --git a/tests/linter/rules/lengths/empty_force_tags/test_rule.py b/tests/linter/rules/lengths/empty_force_tags/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_force_tags/test_rule.py
+++ b/tests/linter/rules/lengths/empty_force_tags/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/lengths/empty_keyword_tags/expected_extended.txt b/tests/linter/rules/lengths/empty_keyword_tags/expected_extended.txt
new file mode 100644
index 0000000..efaff98
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_keyword_tags/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN31 Keyword Tags are empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Keyword Tags
+   | ^^^^^^^^^^^^ LEN31
+   |
+
diff --git a/tests/linter/rules/lengths/empty_keyword_tags/test_rule.py b/tests/linter/rules/lengths/empty_keyword_tags/test_rule.py
index a12eb1d..65843a3 100644
--- a/tests/linter/rules/lengths/empty_keyword_tags/test_rule.py
+++ b/tests/linter/rules/lengths/empty_keyword_tags/test_rule.py
@@ -4,3 +4,11 @@ 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=">=6.0")
+
+    def test_extended(self):
+        self.check_rule(
+            src_files=["test.robot"],
+            expected_file="expected_extended.txt",
+            output_format="extended",
+            test_on_version=">=6.0",
+        )
diff --git a/tests/linter/rules/lengths/empty_library_import/expected_extended.txt b/tests/linter/rules/lengths/empty_library_import/expected_extended.txt
new file mode 100644
index 0000000..4304736
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_library_import/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN17 Import library path is empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Library
+   | ^^^^^^^ LEN17
+   |
+
diff --git a/tests/linter/rules/lengths/empty_library_import/test_rule.py b/tests/linter/rules/lengths/empty_library_import/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_library_import/test_rule.py
+++ b/tests/linter/rules/lengths/empty_library_import/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/lengths/empty_metadata/expected_extended.txt b/tests/linter/rules/lengths/empty_metadata/expected_extended.txt
new file mode 100644
index 0000000..fcf3b75
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_metadata/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN11 Metadata settings does not have any value set
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Metadata
+   | ^ LEN11
+   |
+
diff --git a/tests/linter/rules/lengths/empty_metadata/test_rule.py b/tests/linter/rules/lengths/empty_metadata/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_metadata/test_rule.py
+++ b/tests/linter/rules/lengths/empty_metadata/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/lengths/empty_resource_import/expected_extended.txt b/tests/linter/rules/lengths/empty_resource_import/expected_extended.txt
new file mode 100644
index 0000000..27c7871
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_resource_import/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN16 Import resource path is empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Resource
+   | ^^^^^^^^ LEN16
+   |
+
diff --git a/tests/linter/rules/lengths/empty_resource_import/test_rule.py b/tests/linter/rules/lengths/empty_resource_import/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_resource_import/test_rule.py
+++ b/tests/linter/rules/lengths/empty_resource_import/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/lengths/empty_section/expected_extended.txt b/tests/linter/rules/lengths/empty_section/expected_extended.txt
new file mode 100644
index 0000000..45a77e5
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_section/expected_extended.txt
@@ -0,0 +1,19 @@
+with_empty_sections.robot:1:1 LEN09 Section '*** Settings ***' is empty
+   |
+ 1 | *** Settings ***
+   | ^^^^^^^^^^^^^^^^ LEN09
+   |
+
+with_empty_sections.robot:13:1 LEN09 Section '*** Keywords ***' is empty
+    |
+ 13 | *** Keywords ***
+    | ^^^^^^^^^^^^^^^^ LEN09
+ 14 | # This section considered as empty.
+    |
+
+with_empty_sections.robot:17:1 LEN09 Section '*** Variables ***' is empty
+    |
+ 17 | *** Variables ***
+    | ^^^^^^^^^^^^^^^^^ LEN09
+    |
+
diff --git a/tests/linter/rules/lengths/empty_section/test_rule.py b/tests/linter/rules/lengths/empty_section/test_rule.py
index e0553eb..931c17e 100644
--- a/tests/linter/rules/lengths/empty_section/test_rule.py
+++ b/tests/linter/rules/lengths/empty_section/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/lengths/empty_setup/expected_extended.txt b/tests/linter/rules/lengths/empty_setup/expected_extended.txt
new file mode 100644
index 0000000..a2618fd
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_setup/expected_extended.txt
@@ -0,0 +1,10 @@
+test.robot:9:5 LEN18 Setup of 'Test' Test Case does not have any keywords
+   |
+ 7 |     [Documentation]  doc
+ 8 |     [Tags]  sometag
+ 9 |     [Setup]
+   |     ^^^^^^^ LEN18
+10 |     Pass
+11 |     Keyword
+   |
+
diff --git a/tests/linter/rules/lengths/empty_setup/test_rule.py b/tests/linter/rules/lengths/empty_setup/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_setup/test_rule.py
+++ b/tests/linter/rules/lengths/empty_setup/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/lengths/empty_suite_setup/expected_extended.txt b/tests/linter/rules/lengths/empty_suite_setup/expected_extended.txt
new file mode 100644
index 0000000..fa507d9
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_suite_setup/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN19 Suite Setup does not have any keywords
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Suite Setup
+   | ^^^^^^^^^^^ LEN19
+   |
+
diff --git a/tests/linter/rules/lengths/empty_suite_setup/test_rule.py b/tests/linter/rules/lengths/empty_suite_setup/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_suite_setup/test_rule.py
+++ b/tests/linter/rules/lengths/empty_suite_setup/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/lengths/empty_suite_teardown/expected_extended.txt b/tests/linter/rules/lengths/empty_suite_teardown/expected_extended.txt
new file mode 100644
index 0000000..37dec1c
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_suite_teardown/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN22 Suite Teardown does not have any keywords
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Suite Teardown
+   | ^^^^^^^^^^^^^^ LEN22
+   |
+
diff --git a/tests/linter/rules/lengths/empty_suite_teardown/test_rule.py b/tests/linter/rules/lengths/empty_suite_teardown/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_suite_teardown/test_rule.py
+++ b/tests/linter/rules/lengths/empty_suite_teardown/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/lengths/empty_teardown/expected_extended.txt b/tests/linter/rules/lengths/empty_teardown/expected_extended.txt
new file mode 100644
index 0000000..86cb72d
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_teardown/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:21:5 LEN21 Teardown of 'Keyword' Keyword does not have any keywords
+    |
+ 19 |     No Operation
+ 20 |     Fail
+ 21 |     [Teardown]
+    |     ^^^^^^^^^^ LEN21
+    |
+
diff --git a/tests/linter/rules/lengths/empty_teardown/test_rule.py b/tests/linter/rules/lengths/empty_teardown/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_teardown/test_rule.py
+++ b/tests/linter/rules/lengths/empty_teardown/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/lengths/empty_template/expected_extended.txt b/tests/linter/rules/lengths/empty_template/expected_extended.txt
new file mode 100644
index 0000000..4c4217a
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_template/expected_extended.txt
@@ -0,0 +1,9 @@
+test.robot:14:5 LEN30 Template of 'Test with empty template' Test Case is empty. To overwrite suite Test Template use more explicit [Template]  NONE
+    |
+ 12 |
+ 13 | Test with empty template
+ 14 |     [Template]
+    |     ^^^^^^^^^^ LEN30
+ 15 |     No Operation
+    |
+
diff --git a/tests/linter/rules/lengths/empty_template/test_rule.py b/tests/linter/rules/lengths/empty_template/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_template/test_rule.py
+++ b/tests/linter/rules/lengths/empty_template/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/lengths/empty_test_setup/expected_extended.txt b/tests/linter/rules/lengths/empty_test_setup/expected_extended.txt
new file mode 100644
index 0000000..31208f7
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_test_setup/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN20 Test Setup does not have any keywords
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Test Setup
+   | ^^^^^^^^^^ LEN20
+   |
+
diff --git a/tests/linter/rules/lengths/empty_test_setup/test_rule.py b/tests/linter/rules/lengths/empty_test_setup/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_test_setup/test_rule.py
+++ b/tests/linter/rules/lengths/empty_test_setup/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/lengths/empty_test_teardown/expected_extended.txt b/tests/linter/rules/lengths/empty_test_teardown/expected_extended.txt
new file mode 100644
index 0000000..854d541
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_test_teardown/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN23 Test Teardown does not have any keywords
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Test Teardown
+   | ^^^^^^^^^^^^^ LEN23
+   |
+
diff --git a/tests/linter/rules/lengths/empty_test_teardown/test_rule.py b/tests/linter/rules/lengths/empty_test_teardown/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_test_teardown/test_rule.py
+++ b/tests/linter/rules/lengths/empty_test_teardown/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/lengths/empty_test_template/expected_extended.txt b/tests/linter/rules/lengths/empty_test_template/expected_extended.txt
new file mode 100644
index 0000000..a0d3c80
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_test_template/expected_extended.txt
@@ -0,0 +1,7 @@
+test.robot:2:1 LEN29 Test Template is empty
+   |
+ 1 | *** Settings ***
+ 2 | Test Template
+   | ^^^^^^^^^^^^^ LEN29
+   |
+
diff --git a/tests/linter/rules/lengths/empty_test_template/test_rule.py b/tests/linter/rules/lengths/empty_test_template/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_test_template/test_rule.py
+++ b/tests/linter/rules/lengths/empty_test_template/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/lengths/empty_test_timeout/expected_extended.txt b/tests/linter/rules/lengths/empty_test_timeout/expected_extended.txt
new file mode 100644
index 0000000..061a1f1
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_test_timeout/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN25 Test Timeout is empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Test Timeout
+   | ^^^^^^^^^^^^ LEN25
+   |
+
diff --git a/tests/linter/rules/lengths/empty_test_timeout/test_rule.py b/tests/linter/rules/lengths/empty_test_timeout/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_test_timeout/test_rule.py
+++ b/tests/linter/rules/lengths/empty_test_timeout/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/lengths/empty_timeout/expected_extended.txt b/tests/linter/rules/lengths/empty_timeout/expected_extended.txt
new file mode 100644
index 0000000..569c795
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_timeout/expected_extended.txt
@@ -0,0 +1,10 @@
+test.robot:8:5 LEN24 Timeout of 'Test' Test Case is empty
+   |
+ 6 |     [Documentation]  doc
+ 7 |     [Tags]  sometag
+ 8 |     [Timeout]
+   |     ^^^^^^^^^ LEN24
+ 9 |     Pass
+10 |     Keyword
+   |
+
diff --git a/tests/linter/rules/lengths/empty_timeout/test_rule.py b/tests/linter/rules/lengths/empty_timeout/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_timeout/test_rule.py
+++ b/tests/linter/rules/lengths/empty_timeout/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/lengths/empty_variables_import/expected_extended.txt b/tests/linter/rules/lengths/empty_variables_import/expected_extended.txt
new file mode 100644
index 0000000..9d30c3f
--- /dev/null
+++ b/tests/linter/rules/lengths/empty_variables_import/expected_extended.txt
@@ -0,0 +1,8 @@
+test.robot:3:1 LEN15 Import variables path is empty
+   |
+ 1 | *** Settings ***
+ 2 | Documentation  doc
+ 3 | Variables
+   | ^^^^^^^^^ LEN15
+   |
+
diff --git a/tests/linter/rules/lengths/empty_variables_import/test_rule.py b/tests/linter/rules/lengths/empty_variables_import/test_rule.py
index cba6753..4a48afe 100644
--- a/tests/linter/rules/lengths/empty_variables_import/test_rule.py
+++ b/tests/linter/rules/lengths/empty_variables_import/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/lengths/file_too_long/expected_extended.txt b/tests/linter/rules/lengths/file_too_long/expected_extended.txt
new file mode 100644
index 0000000..f4788a7
--- /dev/null
+++ b/tests/linter/rules/lengths/file_too_long/expected_extended.txt
@@ -0,0 +1,1 @@
+test.robot:434:1 LEN28 File has too many lines (434/400)
\ No newline at end of file
diff --git a/tests/linter/rules/lengths/file_too_long/test_rule.py b/tests/linter/rules/lengths/file_too_long/test_rule.py
index e792cd7..32bc22e 100644
--- a/tests/linter/rules/lengths/file_too_long/test_rule.py
+++ b/tests/linter/rules/lengths/file_too_long/test_rule.py
@@ -8,6 +8,9 @@ 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")
+
     # TODO: we also need to ensure that --threshold E translates to RuleSeverity.Error (there should be ut for it)
     @pytest.mark.parametrize("filter_threshold", [None, RuleSeverity.ERROR, RuleSeverity.WARNING])
     def test_severity_threshold(self, filter_threshold):
diff --git a/tests/linter/rules/lengths/line_too_long/expected_extended.txt b/tests/linter/rules/lengths/line_too_long/expected_extended.txt
new file mode 100644
index 0000000..8bb4073
--- /dev/null
+++ b/tests/linter/rules/lengths/line_too_long/expected_extended.txt
@@ -0,0 +1,27 @@
+test.robot:17:120 LEN08 Line is too long (139/120)
+    |
+ 15 |     Pass
+ 16 |     Keyword
+ 17 |     Keyword With Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong Name And  ${args}
+    |                                                                                                                        ^^^^^^^^^^^^^^^^^^^^ LEN08
+    |
+
+test.robot:27:120 LEN08 Line is too long (159/120)
+    |
+ 25 | *** Keywords ***
+ 26 | Keyword
+ 27 |   [Documentation]  this is looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong doc
+    |                                                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LEN08
+ 28 |     No Operation
+ 29 |     Pass
+    |
+
+test.robot:30:120 LEN08 Line is too long (139/120)
+    |
+ 28 |     No Operation
+ 29 |     Pass
+ 30 |     Keyword With Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong Name And  ${args}
+    |                                                                                                                        ^^^^^^^^^^^^^^^^^^^^ LEN08
+ 31 |     Fail
+    |
+
diff --git a/tests/linter/rules/lengths/line_too_long/expected_output.txt b/tests/linter/rules/lengths/line_too_long/expected_output.txt
index af8def9..4f69d52 100644
--- a/tests/linter/rules/lengths/line_too_long/expected_output.txt
+++ b/tests/linter/rules/lengths/line_too_long/expected_output.txt
@@ -1,3 +1,3 @@
-test.robot:17:1 [W] LEN08 Line is too long (139/120)
-test.robot:27:1 [W] LEN08 Line is too long (159/120)
-test.robot:30:1 [W] LEN08 Line is too long (139/120)
\ No newline at end of file
+test.robot:17:120 [W] LEN08 Line is too long (139/120)
+test.robot:27:120 [W] LEN08 Line is too long (159/120)
+test.robot:30:120 [W] LEN08 Line is too long (139/120)
\ No newline at end of file
diff --git a/tests/linter/rules/lengths/line_too_long/expected_output_severity_threshold.txt b/tests/linter/rules/lengths/line_too_long/expected_output_severity_threshold.txt
index 5644259..1988bbd 100644
--- a/tests/linter/rules/lengths/line_too_long/expected_output_severity_threshold.txt
+++ b/tests/linter/rules/lengths/line_too_long/expected_output_severity_threshold.txt
@@ -1,3 +1,3 @@
-severity_threshold.robot:17:1 [W] LEN08 Line is too long (139/100)
-severity_threshold.robot:27:1 [E] LEN08 Line is too long (159/150)
-severity_threshold.robot:30:1 [W] LEN08 Line is too long (139/100)
\ No newline at end of file
+severity_threshold.robot:17:120 [W] LEN08 Line is too long (139/100)
+severity_threshold.robot:27:120 [E] LEN08 Line is too long (159/150)
+severity_threshold.robot:30:120 [W] LEN08 Line is too long (139/100)
\ No newline at end of file
diff --git a/tests/linter/rules/lengths/line_too_long/test_rule.py b/tests/linter/rules/lengths/line_too_long/test_rule.py
index 87a2e4a..a4c1d80 100644
--- a/tests/linter/rules/lengths/line_too_long/test_rule.py
+++ b/tests/linter/rules/lengths/line_too_long/test_rule.py
@@ -5,6 +5,9 @@ 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")
+
     def test_severity_threshold(self):
         self.check_rule(
             configure=["line-too-long.severity_threshold=warning=100:info=50:error=150"],
diff --git a/tests/linter/rules/lengths/number_of_returned_values/expected_extended.txt b/tests/linter/rules/lengths/number_of_returned_values/expected_extended.txt
new file mode 100644
index 0000000..fb18ba3
--- /dev/null
+++ b/tests/linter/rules/lengths/number_of_returned_values/expected_extended.txt
@@ -0,0 +1,73 @@
+test.robot:24:5 LEN10 Too many return values (5/4)
+    |
+ 22 |     No Operation
+ 23 |     Fail
+ 24 |     RETURN    ${var}  2  4  4  5
+    |     ^^^^^^ LEN10
+    |
+
+test.robot:27:5 LEN10 Too many return values (5/4)
+    |
+ 25 |
+ 26 | Keyword 2
+ 27 |     Return From Keyword  ${var}  2  4  4  5
+    |     ^^^^^^^^^^^^^^^^^^^ LEN10
+    |
+
+test.robot:31:9 LEN10 Too many return values (5/4)
+    |
+ 29 | Keyword 3
+ 30 |     FOR  ${var}  IN RANGE  10
+ 31 |         BuiltIn.Return From Keyword If    ${condition}==${True}    ${var}  2  4  4  5
+    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LEN10
+ 32 |     END
+    |
+
+test.robot:37:13 LEN10 Too many return values (5/4)
+    |
+ 35 |     WHILE    $condition
+ 36 |         TRY
+ 37 |             RETURN    ${var}  2  4  4  5
+    |             ^^^^^^ LEN10
+ 38 |         EXCEPT
+ 39 |             RETURN    ${var}  2  4  4  5
+    |
+
+test.robot:39:13 LEN10 Too many return values (5/4)
+    |
+ 37 |             RETURN    ${var}  2  4  4  5
+ 38 |         EXCEPT
+ 39 |             RETURN    ${var}  2  4  4  5
+    |             ^^^^^^ LEN10
+ 40 |         FINALLY
+ 41 |             RETURN    ${var}  2  4  4  5
+    |
+
+test.robot:41:13 LEN10 Too many return values (5/4)
+    |
+ 39 |             RETURN    ${var}  2  4  4  5
+ 40 |         FINALLY
+ 41 |             RETURN    ${var}  2  4  4  5
+    |             ^^^^^^ LEN10
+ 42 |         ELSE
+ 43 |             RETURN    ${var}  2  4  4  5
+    |
+
+test.robot:43:13 LEN10 Too many return values (5/4)
+    |
+ 41 |             RETURN    ${var}  2  4  4  5
+ 42 |         ELSE
+ 43 |             RETURN    ${var}  2  4  4  5
+    |             ^^^^^^ LEN10
+ 44 |         END
+ 45 |         RETURN    ${var}
+    |
+
+test.robot:47:5 LEN10 Too many return values (5/4)
+    |
+ 45 |         RETURN    ${var}
+ 46 |     END
+ 47 |     [Return]         ${var}  2  4  4  5
+    |     ^^^^^^^^ LEN10
+    |
+
diff --git a/tests/linter/rules/lengths/number_of_returned_values/test_rule.py b/tests/linter/rules/lengths/number_of_returned_values/test_rule.py
index 8f7cf38..140f703 100644
--- a/tests/linter/rules/lengths/number_of_returned_values/test_rule.py
+++ b/tests/linter/rules/lengths/number_of_returned_values/test_rule.py
@@ -5,6 +5,14 @@ class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt", test_on_version=">=5.0")
 
+    def test_extended(self):
+        self.check_rule(
+            src_files=["test.robot"],
+            expected_file="expected_extended.txt",
+            output_format="extended",
+            test_on_version=">=5.0",
+        )
+
     def test_rule_pre_rf5(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output_pre_rf5.txt", test_on_version="<5.0")
 
diff --git a/tests/linter/rules/lengths/too_few_calls_in_keyword/expected_extended.txt b/tests/linter/rules/lengths/too_few_calls_in_keyword/expected_extended.txt
new file mode 100644
index 0000000..7cbe686
--- /dev/null
+++ b/tests/linter/rules/lengths/too_few_calls_in_keyword/expected_extended.txt
@@ -0,0 +1,12 @@
+test.robot:30:1 LEN02 Keyword 'Empty Keyword' has too few keywords inside (0/1)
+    |
+ 30 | Empty Keyword
+    | ^^^^^^^^^^^^^ LEN02
+    |
+
+test.robot:32:1 LEN02 Keyword 'Keyword' has too few keywords inside (0/1)
+    |
+ 32 | Keyword
+    | ^^^^^^^ LEN02
+    |
+
diff --git a/tests/linter/rules/lengths/too_few_calls_in_keyword/test_rule.py b/tests/linter/rules/lengths/too_few_calls_in_keyword/test_rule.py
index 4fd6161..66f5601 100644
--- a/tests/linter/rules/lengths/too_few_calls_in_keyword/test_rule.py
+++ b/tests/linter/rules/lengths/too_few_calls_in_keyword/test_rule.py
@@ -5,6 +5,9 @@ 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")
+
     def test_bug629_rf3(self):
         self.check_rule(
             configure=[
diff --git a/tests/linter/rules/lengths/too_few_calls_in_test_case/expected_extended.txt b/tests/linter/rules/lengths/too_few_calls_in_test_case/expected_extended.txt
new file mode 100644
index 0000000..e7a97e5
--- /dev/null
+++ b/tests/linter/rules/lengths/too_few_calls_in_test_case/expected_extended.txt
@@ -0,0 +1,14 @@
+test.robot:27:1 LEN05 Test case 'Test case with no keyword calls' has too few keywords inside (0/1)
+    |
+ 27 | Test case with no keyword calls
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LEN05
+    |
+
+test.robot:29:1 LEN05 Test case 'Test case with settings and no keyword calls' has too few keywords inside (0/1)
+    |
+ 29 | Test case with settings and no keyword calls
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LEN05
+ 30 |     [Tags]    smoke
+ 31 |     [Setup]    Keyword
+    |
+
diff --git a/tests/linter/rules/lengths/too_few_calls_in_test_case/test_rule.py b/tests/linter/rules/lengths/too_few_calls_in_test_case/test_rule.py
index 5947a78..8dfd333 100644
--- a/tests/linter/rules/lengths/too_few_calls_in_test_case/test_rule.py
+++ b/tests/linter/rules/lengths/too_few_calls_in_test_case/test_rule.py
@@ -8,6 +8,9 @@ class TestRuleAcceptance(RuleAcceptance):
             expected_file="expected_output.txt",
         )
 
+    def test_extended(self):
+        self.check_rule(src_files=["test.robot"], expected_file="expected_extended.txt", output_format="extended")
+
     def test_templated(self):
         self.check_rule(
             configure=["too-few-calls-in-test-case.ignore_templated=True"],
diff --git a/tests/linter/rules/lengths/too_long_keyword/expected_extended.txt b/tests/linter/rules/lengths/too_long_keyword/expected_extended.txt
new file mode 100644
index 0000000..5fe897d
--- /dev/null
+++ b/tests/linter/rules/lengths/too_long_keyword/expected_extended.txt
@@ -0,0 +1,10 @@
+test.robot:15:1 LEN01 Keyword 'Some Keyword' is too long (46/40)
+    |
+ 13 |
+ 14 | *** Keywords ***
+ 15 | Some Keyword
+    | ^^^^^^^^^^^^ LEN01
+ 16 |     [Documentation]  this is doc
+ 17 |     Keyword
+    |
+
diff --git a/tests/linter/rules/lengths/too_long_keyword/test_rule.py b/tests/linter/rules/lengths/too_long_keyword/test_rule.py
index 6ffdc4e..3009742 100644
--- a/tests/linter/rules/lengths/too_long_keyword/test_rule.py
+++ b/tests/linter/rules/lengths/too_long_keyword/test_rule.py
@@ -5,6 +5,9 @@ class TestRule(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")
+
     def test_ignore_docs(self):
         self.check_rule(
             configure=["too-long-keyword.ignore_docs=True"],
diff --git a/tests/linter/rules/lengths/too_long_test_case/expected_extended.txt b/tests/linter/rules/lengths/too_long_test_case/expected_extended.txt
new file mode 100644
index 0000000..cf14201
--- /dev/null
+++ b/tests/linter/rules/lengths/too_long_test_case/expected_extended.txt
@@ -0,0 +1,26 @@
+test.robot:6:1 LEN04 Test case 'Test' is too long (21/20)
+   |
+ 4 |
+ 5 | *** Test Cases ***
+ 6 | Test
+   | ^^^^ LEN04
+ 7 |     [Documentation]  doc
+ 8 |     [Tags]  sometag
+   |
+
+test.robot:29:1 LEN04 Test case 'Test with comments at the end' is too long (23/20)
+    |
+ 29 | Test with comments at the end
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LEN04
+ 30 |     Pass
+ 31 |     Keyword
+    |
+
+test.robot:54:1 LEN04 Test case 'Test with comments that are not part of the test' is too long (24/20)
+    |
+ 54 | Test with comments that are not part of the test
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LEN04
+ 55 |     [Documentation]  abc
+ 56 |     Pass
+    |
+
diff --git a/tests/linter/rules/lengths/too_long_test_case/test_rule.py b/tests/linter/rules/lengths/too_long_test_case/test_rule.py
index e7cf0e1..f0bb637 100644
--- a/tests/linter/rules/lengths/too_long_test_case/test_rule.py
+++ b/tests/linter/rules/lengths/too_long_test_case/test_rule.py
@@ -5,6 +5,9 @@ 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")
+
     def test_ignore_docs(self):
         self.check_rule(
             configure=["too-long-test-case.ignore_docs=True"],
diff --git a/tests/linter/rules/lengths/too_many_arguments/expected_extended.txt b/tests/linter/rules/lengths/too_many_arguments/expected_extended.txt
new file mode 100644
index 0000000..3dd9e1b
--- /dev/null
+++ b/tests/linter/rules/lengths/too_many_arguments/expected_extended.txt
@@ -0,0 +1,22 @@
+test.robot:17:5 LEN07 Keyword 'Keyword With Too Many Arguments' has too many arguments (6/5)
+    |
+ 15 | Keyword With Too Many Arguments
+ 16 |     [Documentation]  this is doc
+ 17 |     [Arguments]  ${var1}  @{var2}  ${var3}  ${var4}  ${var5}  ${var6}
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LEN07
+ 18 |     No Operation
+ 19 |     Pass
+    |
+
+test.robot:25:5 LEN07 Keyword 'Keyword With Too Many Arguments In Multi Lines' has too many arguments (6/5)
+    |  
+ 23 |   Keyword With Too Many Arguments In Multi Lines
+ 24 |       [Documentation]  this is doc
+ 25 | /     [Arguments]  ${var1}  @{var2}
+ 26 | |     ...  ${var3}  ${var4}
+ 27 | |     ...  ${var5}  ${var6}
+    | |_^ LEN07
+ 28 |       No Operation
+ 29 |       Pass
+    |  
+
diff --git a/tests/linter/rules/lengths/too_many_arguments/expected_output.txt b/tests/linter/rules/lengths/too_many_arguments/expected_output.txt
index 86c8c8f..e8c237a 100644
--- a/tests/linter/rules/lengths/too_many_arguments/expected_output.txt
+++ b/tests/linter/rules/lengths/too_many_arguments/expected_output.txt
@@ -1,2 +1,2 @@
-test.robot:15:1 [W] LEN07 Keyword 'Keyword With Too Many Arguments' has too many arguments (6/5)
-test.robot:23:1 [W] LEN07 Keyword 'Keyword With Too Many Arguments In Multi Lines' has too many arguments (6/5)
\ No newline at end of file
+test.robot:17:5 [W] LEN07 Keyword 'Keyword With Too Many Arguments' has too many arguments (6/5)
+test.robot:25:5 [W] LEN07 Keyword 'Keyword With Too Many Arguments In Multi Lines' has too many arguments (6/5)
\ No newline at end of file
diff --git a/tests/linter/rules/lengths/too_many_arguments/expected_output_disablers.txt b/tests/linter/rules/lengths/too_many_arguments/expected_output_disablers.txt
index e7d600c..a39d360 100644
--- a/tests/linter/rules/lengths/too_many_arguments/expected_output_disablers.txt
+++ b/tests/linter/rules/lengths/too_many_arguments/expected_output_disablers.txt
@@ -1,1 +1,1 @@
-disablers.robot:20:1 [W] LEN07 Keyword 'Should Be Reported' has too many arguments (2/1)
\ No newline at end of file
+disablers.robot:21:5 [W] LEN07 Keyword 'Should Be Reported' has too many arguments (2/1)
\ No newline at end of file
diff --git a/tests/linter/rules/lengths/too_many_arguments/expected_output_severity.txt b/tests/linter/rules/lengths/too_many_arguments/expected_output_severity.txt
index 0aac942..596c77c 100644
--- a/tests/linter/rules/lengths/too_many_arguments/expected_output_severity.txt
+++ b/tests/linter/rules/lengths/too_many_arguments/expected_output_severity.txt
@@ -1,2 +1,2 @@
-severity.robot:15:1 [W] LEN07 Keyword 'Keyword With Too Many Arguments' has too many arguments (6/5)
-severity.robot:23:1 [E] LEN07 Keyword 'Keyword With Too Many Arguments In Multi Lines' has too many arguments (7/7)
\ No newline at end of file
+severity.robot:17:5 [W] LEN07 Keyword 'Keyword With Too Many Arguments' has too many arguments (6/5)
+severity.robot:25:5 [E] LEN07 Keyword 'Keyword With Too Many Arguments In Multi Lines' has too many arguments (7/7)
\ No newline at end of file
diff --git a/tests/linter/rules/lengths/too_many_arguments/test_rule.py b/tests/linter/rules/lengths/too_many_arguments/test_rule.py
index 2b703fd..9f990fa 100644
--- a/tests/linter/rules/lengths/too_many_arguments/test_rule.py
+++ b/tests/linter/rules/lengths/too_many_arguments/test_rule.py
@@ -5,6 +5,9 @@ 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")
+
     def test_severity(self):
         self.check_rule(
             configure=["too-many-arguments.severity_threshold=warning=5:error=7"],
diff --git a/tests/linter/rules/lengths/too_many_calls_in_keyword/expected_extended.txt b/tests/linter/rules/lengths/too_many_calls_in_keyword/expected_extended.txt
new file mode 100644
index 0000000..dd2c2ae
--- /dev/null
+++ b/tests/linter/rules/lengths/too_many_calls_in_keyword/expected_extended.txt
@@ -0,0 +1,10 @@
+test.robot:15:1 LEN03 Keyword 'Some Keyword' has too many keywords inside (11/10)
+    |
+ 13 |
+ 14 | *** Keywords ***
+ 15 | Some Keyword
+    | ^^^^^^^^^^^^ LEN03
+ 16 |     [Documentation]  this is doc
+ 17 |     No Operation
+    |
+
diff --git a/tests/linter/rules/lengths/too_many_calls_in_keyword/test_rule.py b/tests/linter/rules/lengths/too_many_calls_in_keyword/test_rule.py
index e5c5788..6fd1dc9 100644
--- a/tests/linter/rules/lengths/too_many_calls_in_keyword/test_rule.py
+++ b/tests/linter/rules/lengths/too_many_calls_in_keyword/test_rule.py
@@ -5,6 +5,9 @@ class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(src_files=["test.robot"], expected_file="expected_output.txt", test_on_version="<7.2")
 
+    def test_extended(self):
+        self.check_rule(src_files=["test.robot"], expected_file="expected_extended.txt", output_format="extended")
+
     def test_with_groups(self):
         self.check_rule(src_files=["groups.robot"], expected_file="expected_output_groups.txt", test_on_version=">=7.2")
 
diff --git a/tests/linter/rules/lengths/too_many_calls_in_test_case/expected_extended.txt b/tests/linter/rules/lengths/too_many_calls_in_test_case/expected_extended.txt
new file mode 100644
index 0000000..e72cd06
--- /dev/null
+++ b/tests/linter/rules/lengths/too_many_calls_in_test_case/expected_extended.txt
@@ -0,0 +1,10 @@
+test.robot:6:1 LEN06 Test case 'Test' has too many keywords inside (13/10)
+   |
+ 4 |
+ 5 | *** Test Cases ***
+ 6 | Test
+   | ^^^^ LEN06
+ 7 |     [Documentation]  doc
+ 8 |     [Tags]  sometag
+   |
+
diff --git a/tests/linter/rules/lengths/too_many_calls_in_test_case/test_rule.py b/tests/linter/rules/lengths/too_many_calls_in_test_case/test_rule.py
index 8c0483b..27aa224 100644
--- a/tests/linter/rules/lengths/too_many_calls_in_test_case/test_rule.py
+++ b/tests/linter/rules/lengths/too_many_calls_in_test_case/test_rule.py
@@ -8,6 +8,9 @@ class TestRuleAcceptance(RuleAcceptance):
             expected_file="expected_output.txt",
         )
 
+    def test_extended(self):
+        self.check_rule(src_files=["test.robot"], expected_file="expected_extended.txt", output_format="extended")
+
     def test_ignore_templated(self):
         self.check_rule(
             configure=["too-many-calls-in-test-case.ignore_templated=True"],
diff --git a/tests/linter/rules/lengths/too_many_test_cases/expected_extended.txt b/tests/linter/rules/lengths/too_many_test_cases/expected_extended.txt
new file mode 100644
index 0000000..e12b45c
--- /dev/null
+++ b/tests/linter/rules/lengths/too_many_test_cases/expected_extended.txt
@@ -0,0 +1,15 @@
+test.robot:1:1 LEN27 Too many test cases (51/50)
+   |
+ 1 | *** Test Cases ***
+   | ^^^^^^^^^^^^^^^^^^ LEN27
+ 2 | # Some comment
+   |
+
+templated_test.robot:5:1 LEN27 Too many test cases (101/100)
+   |
+ 5 | *** Test Cases ***
+   | ^^^^^^^^^^^^^^^^^^ LEN27
+ 6 | # Some comment
+ 7 | TestCase1      ${arg}    ${arg}
+   |
+
diff --git a/tests/linter/rules/lengths/too_many_test_cases/test_rule.py b/tests/linter/rules/lengths/too_many_test_cases/test_rule.py
index a6b296d..d4a19e2 100644
--- a/tests/linter/rules/lengths/too_many_test_cases/test_rule.py
+++ b/tests/linter/rules/lengths/too_many_test_cases/test_rule.py
@@ -5,6 +5,13 @@ class TestRuleAcceptance(RuleAcceptance):
     def test_rule(self):
         self.check_rule(src_files=["test.robot", "templated_test.robot"], expected_file="expected_output.txt")
 
+    def test_extended(self):
+        self.check_rule(
+            src_files=["test.robot", "templated_test.robot"],
+            expected_file="expected_extended.txt",
+            output_format="extended",
+        )
+
     def test_severity(self):
         self.check_rule(
             configure=[