Repository: sqlfluff/sqlfluff

Issue:
layout.end-of-file is the only rule in kebab case
### Search before asking

- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.


### What Happened

Our rules are all in `snake_case`, except for `layout.end-of-file`

### Expected Behaviour

All rules should be in snake case

### Observed Behaviour

As above

### How to reproduce

-

### Dialect

NA

### Version

Main

### Configuration

NA

### Are you willing to work on and submit a PR to address the issue?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/sqlfluff/sqlfluff/blob/main/CODE_OF_CONDUCT.md)



Discussion:

Patch:
diff --git a/docs/generate-rule-docs.py b/docs/generate-rule-docs.py
--- a/docs/generate-rule-docs.py
+++ b/docs/generate-rule-docs.py
@@ -41,8 +41,9 @@
         # Set the bundle name to the ref.
         _bundle_name = f":ref:`bundle_{bundle}`"
         for idx, rule in enumerate(rule_bundles[bundle]):
-            aliases = ", ".join(rule.aliases[:3]) + (
-                "," if len(rule.aliases) > 3 else ""
+            step = 1  # The number of aliases per line.
+            aliases = ", ".join(rule.aliases[:step]) + (
+                "," if len(rule.aliases) > step else ""
             )
             name_ref = f":sqlfluff:ref:`{rule.name}`"
             code_ref = f":sqlfluff:ref:`{rule.code}`"
@@ -51,15 +52,16 @@
                 f"| {code_ref : <28} | {aliases : <18} |\n"
             )
 
-            j = 3
+            j = 1
+
             while True:
                 if not rule.aliases[j:]:
                     break
-                aliases = ", ".join(rule.aliases[j : j + 3]) + (
-                    "," if len(rule.aliases[j:]) > 3 else ""
+                aliases = ", ".join(rule.aliases[j : j + step]) + (
+                    "," if len(rule.aliases[j:]) > step else ""
                 )
                 f.write(f"|{' ' * 42}|{' ' * 50}|{' ' * 30}| {aliases : <18} |\n")
-                j += 3
+                j += step
 
             if idx + 1 < len(rule_bundles[bundle]):
                 f.write(f"|{' ' * 42}+{'-' * 50}+{'-' * 30}+{'-' * 20}+\n")
diff --git a/src/sqlfluff/rules/layout/LT12.py b/src/sqlfluff/rules/layout/LT12.py
--- a/src/sqlfluff/rules/layout/LT12.py
+++ b/src/sqlfluff/rules/layout/LT12.py
@@ -102,8 +102,10 @@ class Rule_LT12(BaseRule):
 
     """
 
-    name = "layout.end-of-file"
-    aliases = ("L009",)
+    name = "layout.end_of_file"
+    # Between 2.0.0 and 2.0.4 we supported had a kebab-case name for this rule
+    # so the old name remains here as an alias to enable backward compatibility.
+    aliases = ("L009", "layout.end-of-file")
     groups = ("all", "core", "layout")
 
     targets_templated = True


Test patch:
diff --git a/test/api/simple_test.py b/test/api/simple_test.py
--- a/test/api/simple_test.py
+++ b/test/api/simple_test.py
@@ -95,7 +95,7 @@
         "line_no": 1,
         "line_pos": 41,
         "description": "Files must end with a single trailing newline.",
-        "name": "layout.end-of-file",
+        "name": "layout.end_of_file",
     },
 ]