diff --git a/.csharpierignore b/.csharpierignore index 7e3489e..cf72dd9 100644 --- a/.csharpierignore +++ b/.csharpierignore @@ -1,3 +1,3 @@ -**/nuget.config -**/_snapshots/ -**/_snapshot/ +**/[Nn]u[Gg]et.config +**/*.verified.* +**/*.received.* diff --git a/.editorconfig b/.editorconfig index 175c36f..5ffb95a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -44,18 +44,22 @@ generated_code = true # XML project files [*.{slnx,csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,nativeproj,locproj}] indent_size = 2 +max_line_length = 200 # Xml build files [*.builds] indent_size = 2 +max_line_length = 200 # Xml files [*.{xml,stylecop,resx,ruleset}] indent_size = 2 +max_line_length = 200 # XML config files [*.{props,targets,ruleset,config,nuspec,vsixmanifest,vsct}] indent_size = 2 +max_line_length = 200 # JSON files [*.json] @@ -86,10 +90,6 @@ insert_final_newline = false [*.sln] indent_style = tab -[*.{received,verified}.txt] -insert_final_newline = false -trim_trailing_whitespace = false - [*.{cs,csx,vb,vbx}] # .NET Code Style Settings # See https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference @@ -134,6 +134,13 @@ dotnet_naming_rule.all_const.severity = error dotnet_naming_rule.all_const.style = all_elements dotnet_naming_rule.all_const.symbols = all_const +dotnet_naming_style.all_static_readonly.capitalization = pascal_case +dotnet_naming_symbols.all_static_readonly.applicable_kinds = field +dotnet_naming_symbols.all_static_readonly.required_modifiers = static, readonly +dotnet_naming_rule.all_static_readonly.severity = error +dotnet_naming_rule.all_static_readonly.style = all_static_readonly +dotnet_naming_rule.all_static_readonly.symbols = all_static_readonly + dotnet_naming_style.all_fields.required_prefix = _ dotnet_naming_style.all_fields.capitalization = camel_case dotnet_naming_symbols.all_fields.applicable_kinds = field @@ -263,22 +270,26 @@ dotnet_diagnostic.IDE0046.severity = sugges csharp_style_prefer_primary_constructors = false dotnet_diagnostic.IDE0290.severity = suggestion +# IDE0060: Remove unused parameter +dotnet_diagnostic.IDE0060.severity = warning +dotnet_diagnostic.RCS1163.severity = none +dotnet_code_quality_unused_parameters = all + # [CSharpier] Incompatible rules deactivated # https://csharpier.com/docs/IntegratingWithLinters#code-analysis-rules dotnet_diagnostic.IDE0055.severity = none -dotnet_diagnostic.SA1000.severity = none -dotnet_diagnostic.SA1009.severity = none -dotnet_diagnostic.SA1111.severity = none -dotnet_diagnostic.SA1118.severity = none -dotnet_diagnostic.SA1137.severity = none -dotnet_diagnostic.SA1413.severity = none -dotnet_diagnostic.SA1500.severity = none -dotnet_diagnostic.SA1501.severity = none -dotnet_diagnostic.SA1502.severity = none -dotnet_diagnostic.SA1504.severity = none -dotnet_diagnostic.SA1515.severity = none -dotnet_diagnostic.SA1516.severity = none # Support for NetEvolve.Arguments Methods # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1062#null-check-validation-methods dotnet_code_quality.CA1062.null_check_validation_methods = M:NetEvolve.Arguments.Argument.ThrowIfNull(System.Object,System.String)|M:NetEvolve.Arguments.Argument.ThrowIfNull(System.Void*,System.String)|M:NetEvolve.Arguments.Argument.ThrowIfNullOrEmpty(System.String,System.String)|M:NetEvolve.Arguments.Argument.ThrowIfNullOrEmpty``1(System.Collections.Generic.IEnumerable{``0},System.String)|M:NetEvolve.Arguments.Argument.ThrowIfNullOrWhiteSpace(System.String,System.String) + +# Disable all style rules for generated code +[*.{received,verified}.*] +generated_code = true +# Disable all style rules for migrations +dotnet_analyzer_diagnostic.severity = none + +[**/Migrations/*.{cs,csx,vb,vbx}] +generated_code = true +# Disable all style rules for migrations +dotnet_analyzer_diagnostic.severity = none diff --git a/.gitattributes b/.gitattributes index 3d6b51a..a6fc23c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,4 @@ * text=auto eol=lf -* text eol=lf # (binary is a macro for -text -diff) *.png binary diff --git a/.gitignore b/.gitignore index 7bcbf66..0279c9e 100644 --- a/.gitignore +++ b/.gitignore @@ -364,3 +364,13 @@ MigrationBackup/ # Prevent nested .editorconfig files - only root .editorconfig should be used **/.editorconfig !/.editorconfig + +# MemPalace per-project files +.mempalace/ +mempalace.yaml +entities.json + +# Beads / Dolt files (added by bd init) +.dolt/ +*.db +.beads-credential-key diff --git a/Directory.Packages.props b/Directory.Packages.props index 01a356c..d081538 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,11 +5,17 @@ + - + + + + + + diff --git a/src/NetEvolve.Extensions.Strings/NetEvolve.Extensions.Strings.csproj b/src/NetEvolve.Extensions.Strings/NetEvolve.Extensions.Strings.csproj index d7b15d4..3a9c343 100644 --- a/src/NetEvolve.Extensions.Strings/NetEvolve.Extensions.Strings.csproj +++ b/src/NetEvolve.Extensions.Strings/NetEvolve.Extensions.Strings.csproj @@ -1,6 +1,6 @@  - netstandard2.0;net8.0;net9.0;net10.0 + netstandard2.0;net6.0;net7.0;net8.0;net9.0;net10.0 $(MSBuildProjectName) Library with common `string` extension methods for easy reuse. string;extensions;methods diff --git a/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureEndsWith.cs b/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureEndsWith.cs index a7473bd..d16dc49 100644 --- a/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureEndsWith.cs +++ b/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureEndsWith.cs @@ -19,8 +19,8 @@ public static string EnsureEndsWith( StringComparison comparison = StringComparison.CurrentCulture ) { - Argument.ThrowIfNull(value); - Argument.ThrowIfNull(suffix); + ArgumentNullException.ThrowIfNull(value); + ArgumentNullException.ThrowIfNull(suffix); return value.EndsWith(suffix, comparison) ? value : $"{value}{suffix}"; } diff --git a/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureStartsWith.cs b/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureStartsWith.cs index 8d1b935..b3262ed 100644 --- a/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureStartsWith.cs +++ b/src/NetEvolve.Extensions.Strings/StringExtensions.EnsureStartsWith.cs @@ -19,8 +19,8 @@ public static string EnsureStartsWith( StringComparison comparison = StringComparison.CurrentCulture ) { - Argument.ThrowIfNull(value); - Argument.ThrowIfNull(prefix); + ArgumentNullException.ThrowIfNull(value); + ArgumentNullException.ThrowIfNull(prefix); return value.StartsWith(prefix, comparison) ? value : $"{prefix}{value}"; }