From 16eb1d61466453031ad52aa9b5999afe93f914f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Bl=C3=B6chlinger?= <75254358+dg-marbl@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:57:03 +0200 Subject: [PATCH 1/2] Update SA1518.md with .editorconfig details To avoid confusion if using an .editorconfig and the default configuration of the analyzer configuration is not used. See in [code](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/513ba0fefdf66e86c030c00a73812322585358ae/StyleCop.Analyzers/StyleCop.Analyzers/Settings/ObjectModel/LayoutSettings.cs#L71) --- documentation/SA1518.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/SA1518.md b/documentation/SA1518.md index 8408c95ce..67992ba29 100644 --- a/documentation/SA1518.md +++ b/documentation/SA1518.md @@ -31,6 +31,8 @@ The specific settings is one of the following: * Require: Files are required to end with a single newline character * Omit: Files may not end with a newline character +If you have set `insert_final_newline` in an `.editorconfig` file, it will be used to set this analyzer rule to either Require (`insert_final_newline = true`) or Omit (`insert_final_newline = false`). + ## How to fix violations To fix a violation of this rule, update the line endings at the end of the file to match the settings for the current From 9a8688d6997b8e002609b0d7483fa4e657585440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Bl=C3=B6chlinger?= <75254358+dg-marbl@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:05:34 +0200 Subject: [PATCH 2/2] Better line breaks --- documentation/SA1518.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/SA1518.md b/documentation/SA1518.md index 67992ba29..32d4804bf 100644 --- a/documentation/SA1518.md +++ b/documentation/SA1518.md @@ -31,7 +31,9 @@ The specific settings is one of the following: * Require: Files are required to end with a single newline character * Omit: Files may not end with a newline character -If you have set `insert_final_newline` in an `.editorconfig` file, it will be used to set this analyzer rule to either Require (`insert_final_newline = true`) or Omit (`insert_final_newline = false`). +If you have set `insert_final_newline` in an `.editorconfig` file, it will be used to set this analyzer rule to either: +* Require (`insert_final_newline = true`) +* Omit (`insert_final_newline = false`). ## How to fix violations