Skip to content

Commit d615ea5

Browse files
committed
fix: add final newlines and fix whitespace issues
1 parent 399b014 commit d615ea5

39 files changed

+48
-39
lines changed

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,7 @@ dotnet_diagnostic.SA1503.severity = warning
5555
dotnet_diagnostic.SA1122.severity = warning
5656

5757
# SA1116: Split parameters should start on line after declaration
58-
dotnet_diagnostic.SA1116.severity = warning
58+
dotnet_diagnostic.SA1116.severity = warning
59+
60+
# Enforce final newline
61+
insert_final_newline = true

add_final_newlines.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# Find all C# files and ensure they have a final newline
4+
find . -name "*.cs" -type f -exec sh -c 'if [ "$(tail -c 1 "$1" | wc -l)" -eq 0 ]; then echo "" >> "$1"; fi' sh {} \;
5+
6+
# Fix the whitespace issue in AssemblyLoader.cs manually

src/DotNetApiDiff/ApiExtraction/ApiExtractor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,4 @@ public static bool IsCompilerGenerated(this Type type)
197197
// Check for CompilerGeneratedAttribute using IsDefined for better performance
198198
return type.IsDefined(typeof(System.Runtime.CompilerServices.CompilerGeneratedAttribute), true);
199199
}
200-
}
200+
}

src/DotNetApiDiff/ApiExtraction/MemberSignatureBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,4 +860,4 @@ private string GetMostAccessible(string access1, string access2)
860860

861861
return access1; // Default to first if not found
862862
}
863-
}
863+
}

src/DotNetApiDiff/ApiExtraction/TypeAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,4 +660,4 @@ private bool IsPublicOrOverrideEvent(EventInfo eventInfo)
660660

661661
return false;
662662
}
663-
}
663+
}

src/DotNetApiDiff/AssemblyLoading/AssemblyLoader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public Assembly LoadAssembly(string assemblyPath)
8383

8484
this.logger.LogInformation(
8585
"Successfully loaded assembly: {AssemblyName} from {Path}",
86-
assembly.GetName().Name,
86+
assembly.GetName().Name,
8787
assemblyPath);
8888

8989
return assembly;
@@ -210,4 +210,4 @@ public void Dispose()
210210
UnloadAll();
211211
GC.SuppressFinalize(this);
212212
}
213-
}
213+
}

src/DotNetApiDiff/AssemblyLoading/IsolatedAssemblyLoadContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ public void AddSearchPath(string path)
130130
_logger?.LogDebug("Added search path: {Path}", path);
131131
}
132132
}
133-
}
133+
}

src/DotNetApiDiff/Interfaces/IApiComparer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ public interface IApiComparer
3131
/// <param name="newType">New type to compare against</param>
3232
/// <returns>List of member-level differences</returns>
3333
IEnumerable<ApiDifference> CompareMembers(Type oldType, Type newType);
34-
}
34+
}

src/DotNetApiDiff/Interfaces/IApiExtractor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ public interface IApiExtractor
2828
/// <param name="assembly">Assembly to get types from</param>
2929
/// <returns>Collection of public types</returns>
3030
IEnumerable<Type> GetPublicTypes(Assembly assembly);
31-
}
31+
}

src/DotNetApiDiff/Interfaces/IAssemblyLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ public interface IAssemblyLoader
2222
/// <param name="assemblyPath">Path to validate</param>
2323
/// <returns>True if path contains a valid assembly, false otherwise</returns>
2424
bool IsValidAssembly(string assemblyPath);
25-
}
25+
}

0 commit comments

Comments
 (0)