From 0442ef2a8920bb83ecd28f584a986c04b24b6d83 Mon Sep 17 00:00:00 2001 From: Riccardo De Agostini Date: Mon, 13 Sep 2021 11:11:30 +0200 Subject: [PATCH] Code style change: require newline at end of files. --- .editorconfig | 4 ++-- CHANGELOG.md | 2 +- Cecil.XmlDocNames.sln.DotSettings | 1 + Common.props | 2 +- Directory.Build.props | 2 +- Directory.Build.targets | 2 +- Directory.Packages.props | 2 +- README.md | 2 +- THIRD-PARTY-NOTICES | 2 +- VERSION | 2 +- src/Cecil.XmlDocNames/MemberReferenceExtensions.cs | 2 +- src/Cecil.XmlDocNames/StringBuilderExtensions-Cecil.cs | 2 +- src/Cecil.XmlDocNames/StringBuilderExtensions-common.cs | 2 +- src/Cecil.XmlDocNames/StringBuilderExtensions.cs | 2 +- stylecop.json | 4 ++-- .../Internal/AssemblyDefinitionExtensions.cs | 2 +- tests/Cecil.XmlDocNames.Tests/Internal/TestUtility.cs | 2 +- .../Internal/TypeDefinitionExtensions.cs | 2 +- tests/Cecil.XmlDocNames.Tests/StringBuilderExtensionsTest.cs | 2 +- 19 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.editorconfig b/.editorconfig index 644a967..3a4fd68 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,12 +6,12 @@ root = true indent_style = space indent_size = 4 end_of_line = crlf -insert_final_newline = false +insert_final_newline = true trim_trailing_whitespace = true # Code files [*.{cs,csx,vb,vbx}] -insert_final_newline = false +insert_final_newline = true charset = utf-8-bom # Xml project files diff --git a/CHANGELOG.md b/CHANGELOG.md index 578cd6c..99bdf08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,4 +53,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Initial release, deprecated because of ownership change. -If you were using this release, you can safely update to v1.1.0. \ No newline at end of file +If you were using this release, you can safely update to v1.1.0. diff --git a/Cecil.XmlDocNames.sln.DotSettings b/Cecil.XmlDocNames.sln.DotSettings index cbbd104..c5a19c2 100644 --- a/Cecil.XmlDocNames.sln.DotSettings +++ b/Cecil.XmlDocNames.sln.DotSettings @@ -52,6 +52,7 @@ True True True + True 1 16 NEVER diff --git a/Common.props b/Common.props index e4b41a9..7d9545c 100644 --- a/Common.props +++ b/Common.props @@ -25,4 +25,4 @@ true - \ No newline at end of file + diff --git a/Directory.Build.props b/Directory.Build.props index 17d7fe5..18abbd9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,4 +4,4 @@ - \ No newline at end of file + diff --git a/Directory.Build.targets b/Directory.Build.targets index 8d5f1ff..15b0fe2 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -4,4 +4,4 @@ - \ No newline at end of file + diff --git a/Directory.Packages.props b/Directory.Packages.props index b72760f..8553ce3 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/README.md b/README.md index afd4889..7bd9cac 100644 --- a/README.md +++ b/README.md @@ -46,4 +46,4 @@ The font used in the logo is [BloggerSans.otf](https://fontlibrary.org/en/font/b --- -*Disclaimer:* The author of this library is in no way affiliated to [JetBrains s.r.o.](https://www.jetbrains.com/) (the makers of ReSharper) other than being a satisfied cutomer. \ No newline at end of file +*Disclaimer:* The author of this library is in no way affiliated to [JetBrains s.r.o.](https://www.jetbrains.com/) (the makers of ReSharper) other than being a satisfied cutomer. diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 879f03c..1fdb6a6 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -73,4 +73,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/VERSION b/VERSION index cb174d5..6085e94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.1 \ No newline at end of file +1.2.1 diff --git a/src/Cecil.XmlDocNames/MemberReferenceExtensions.cs b/src/Cecil.XmlDocNames/MemberReferenceExtensions.cs index 3144cde..62464fd 100644 --- a/src/Cecil.XmlDocNames/MemberReferenceExtensions.cs +++ b/src/Cecil.XmlDocNames/MemberReferenceExtensions.cs @@ -47,4 +47,4 @@ public static string GetXmlDocName(this MemberReference @this) return new StringBuilder().AppendXmlDocName(@this).ToString(); } } -} \ No newline at end of file +} diff --git a/src/Cecil.XmlDocNames/StringBuilderExtensions-Cecil.cs b/src/Cecil.XmlDocNames/StringBuilderExtensions-Cecil.cs index c0054d8..69bbc6b 100644 --- a/src/Cecil.XmlDocNames/StringBuilderExtensions-Cecil.cs +++ b/src/Cecil.XmlDocNames/StringBuilderExtensions-Cecil.cs @@ -206,4 +206,4 @@ private static StringBuilder AppendDocNameCore(this StringBuilder sb, PropertyRe private static StringBuilder AppendDocNameCore(this StringBuilder sb, MemberReference field) => sb.AppendDocNameCore(field.DeclaringType).Append('.').AppendMemberName(field); } -} \ No newline at end of file +} diff --git a/src/Cecil.XmlDocNames/StringBuilderExtensions-common.cs b/src/Cecil.XmlDocNames/StringBuilderExtensions-common.cs index d5ac455..f0d005c 100644 --- a/src/Cecil.XmlDocNames/StringBuilderExtensions-common.cs +++ b/src/Cecil.XmlDocNames/StringBuilderExtensions-common.cs @@ -53,4 +53,4 @@ private static StringBuilder InvokeForEach(this StringBuilder sb, IEnumerable return sb; } } -} \ No newline at end of file +} diff --git a/src/Cecil.XmlDocNames/StringBuilderExtensions.cs b/src/Cecil.XmlDocNames/StringBuilderExtensions.cs index c935833..7bd4e50 100644 --- a/src/Cecil.XmlDocNames/StringBuilderExtensions.cs +++ b/src/Cecil.XmlDocNames/StringBuilderExtensions.cs @@ -19,4 +19,4 @@ namespace Cecil.XmlDocNames public static partial class StringBuilderExtensions { } -} \ No newline at end of file +} diff --git a/stylecop.json b/stylecop.json index 80eff61..871a1c1 100644 --- a/stylecop.json +++ b/stylecop.json @@ -38,7 +38,7 @@ }, "layoutRules": { - "newlineAtEndOfFile": "omit", + "newlineAtEndOfFile": "require", "allowConsecutiveUsings": true }, @@ -63,4 +63,4 @@ "excludeFromPunctuationCheck": [ "exception", "seealso" ] } } -} \ No newline at end of file +} diff --git a/tests/Cecil.XmlDocNames.Tests/Internal/AssemblyDefinitionExtensions.cs b/tests/Cecil.XmlDocNames.Tests/Internal/AssemblyDefinitionExtensions.cs index 772e766..7d86034 100644 --- a/tests/Cecil.XmlDocNames.Tests/Internal/AssemblyDefinitionExtensions.cs +++ b/tests/Cecil.XmlDocNames.Tests/Internal/AssemblyDefinitionExtensions.cs @@ -19,4 +19,4 @@ public static TypeDefinition GetTypeThatStartsWith(this AssemblyDefinition @this => @this.Modules.SelectMany(m => m.GetTypes()) .First(t => t.Name.StartsWith(prefix, StringComparison.Ordinal)); } -} \ No newline at end of file +} diff --git a/tests/Cecil.XmlDocNames.Tests/Internal/TestUtility.cs b/tests/Cecil.XmlDocNames.Tests/Internal/TestUtility.cs index b488f7f..42e4065 100644 --- a/tests/Cecil.XmlDocNames.Tests/Internal/TestUtility.cs +++ b/tests/Cecil.XmlDocNames.Tests/Internal/TestUtility.cs @@ -29,4 +29,4 @@ public static AssemblyDefinition ReadExampleAssembly() return AssemblyDefinition.ReadAssembly(assemblyPath, readerParameters); } } -} \ No newline at end of file +} diff --git a/tests/Cecil.XmlDocNames.Tests/Internal/TypeDefinitionExtensions.cs b/tests/Cecil.XmlDocNames.Tests/Internal/TypeDefinitionExtensions.cs index 58f23f2..c6ba039 100644 --- a/tests/Cecil.XmlDocNames.Tests/Internal/TypeDefinitionExtensions.cs +++ b/tests/Cecil.XmlDocNames.Tests/Internal/TypeDefinitionExtensions.cs @@ -27,4 +27,4 @@ public static EventDefinition GetEventThatStartsWith(this TypeDefinition @this, public static PropertyDefinition GetPropertyThatStartsWith(this TypeDefinition @this, string prefix) => @this.Properties.First(t => t.Name.StartsWith(prefix, StringComparison.Ordinal)); } -} \ No newline at end of file +} diff --git a/tests/Cecil.XmlDocNames.Tests/StringBuilderExtensionsTest.cs b/tests/Cecil.XmlDocNames.Tests/StringBuilderExtensionsTest.cs index 2fc33dc..81fb735 100644 --- a/tests/Cecil.XmlDocNames.Tests/StringBuilderExtensionsTest.cs +++ b/tests/Cecil.XmlDocNames.Tests/StringBuilderExtensionsTest.cs @@ -152,4 +152,4 @@ public void AppendXmlDocName_WithGenericMethodOfGenericType_ReturnsCorrectValue( Assert.AreEqual("M:ExampleAssembly.GenericClass`1.GenericMethod``1(`0,`0@,``0[],System.Collections.Generic.IEnumerable{``0}@)", result); } } -} \ No newline at end of file +}