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:
coveralls: ## Pull Request Test Coverage Report for [Build 4699967835](https://coveralls.io/builds/58910168)

* **2** of **2**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage remained the same at **100.0%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/58910168/badge)](https://coveralls.io/builds/58910168) |
| :-- | --: |
| Change from base [Build 4698587296](https://coveralls.io/builds/58903707): |  0.0% |
| Covered Lines: | 17847 |
| Relevant Lines: | 17847 |

---
##### 💛  - [Coveralls](https://coveralls.io)


Patch:
diff --git a/README.md b/README.md
index 43d641a0b..fd73689c8 100644
--- a/README.md
+++ b/README.md
@@ -101,7 +101,7 @@ L:   1 | P:  14 | LT01 | Expected only single space before naked identifier.
 L:   1 | P:  27 | LT01 | Unnecessary trailing whitespace at end of file.
                        | [layout.spacing]
 L:   1 | P:  27 | LT12 | Files must end with a single trailing newline.
-                       | [layout.end-of-file]
+                       | [layout.end_of_file]
 All Finished 📜 🎉!
 ```
 
diff --git a/docs/generate-rule-docs.py b/docs/generate-rule-docs.py
index 109d1a4b4..8551e190d 100644
--- a/docs/generate-rule-docs.py
+++ b/docs/generate-rule-docs.py
@@ -41,8 +41,9 @@ with open(base_path / "source/partials/rule_table.rst", "w", encoding="utf8") as
         # 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 @@ with open(base_path / "source/partials/rule_table.rst", "w", encoding="utf8") as
                 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/docs/source/index.rst b/docs/source/index.rst
index fc486e242..6fee6331b 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -46,7 +46,7 @@ have python or pip already installed see :ref:`gettingstartedref`.
     L:   1 | P:  27 | LT01 | Unnecessary trailing whitespace at end of file.
                            | [layout.spacing]
     L:   1 | P:  27 | LT12 | Files must end with a single trailing newline.
-                           | [layout.end-of-file]
+                           | [layout.end_of_file]
     All Finished 📜 🎉!
 
 Contents
diff --git a/src/sqlfluff/rules/layout/LT12.py b/src/sqlfluff/rules/layout/LT12.py
index 7f1f570e6..49cccf7a5 100644
--- 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
index e83adfe20..cc99435ab 100644
--- a/test/api/simple_test.py
+++ b/test/api/simple_test.py
@@ -95,7 +95,7 @@ lint_result = [
         "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",
     },
 ]