Skip to content

Commit c60b2e7

Browse files
chore(deps): update dependency netevolve.defaults to 2.6.0 (#416)
* chore(deps): update dependency netevolve.defaults to 2.6.0 * fix: Update analyzers, code style, and ignore rules - Added Meziantou.Analyzer and Roslynator packages to Directory.Packages.props. - Enhanced .editorconfig with stricter naming and formatting rules, increased max line length, and disabled style rules for generated/migration code. - Updated ignore files for NuGet, MemPalace, Beads/Dolt, and test artifacts. - Simplified .gitattributes. - Used StringComparer.Ordinal in NullExternalScopeProviderTests for dictionary key comparison. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Martin Stühmer <me@samtrion.net>
1 parent cbdd853 commit c60b2e7

6 files changed

Lines changed: 48 additions & 22 deletions

File tree

.csharpierignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
**/nuget.config
2-
**/_snapshots/
3-
**/_snapshot/
1+
**/[Nn]u[Gg]et.config
2+
**/*.verified.*
3+
**/*.received.*

.editorconfig

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,22 @@ generated_code = true
4444
# XML project files
4545
[*.{slnx,csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,nativeproj,locproj}]
4646
indent_size = 2
47+
max_line_length = 200
4748

4849
# Xml build files
4950
[*.builds]
5051
indent_size = 2
52+
max_line_length = 200
5153

5254
# Xml files
5355
[*.{xml,stylecop,resx,ruleset}]
5456
indent_size = 2
57+
max_line_length = 200
5558

5659
# XML config files
5760
[*.{props,targets,ruleset,config,nuspec,vsixmanifest,vsct}]
5861
indent_size = 2
62+
max_line_length = 200
5963

6064
# JSON files
6165
[*.json]
@@ -86,10 +90,6 @@ insert_final_newline = false
8690
[*.sln]
8791
indent_style = tab
8892

89-
[*.{received,verified}.txt]
90-
insert_final_newline = false
91-
trim_trailing_whitespace = false
92-
9393
[*.{cs,csx,vb,vbx}]
9494
# .NET Code Style Settings
9595
# 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
134134
dotnet_naming_rule.all_const.style = all_elements
135135
dotnet_naming_rule.all_const.symbols = all_const
136136

137+
dotnet_naming_style.all_static_readonly.capitalization = pascal_case
138+
dotnet_naming_symbols.all_static_readonly.applicable_kinds = field
139+
dotnet_naming_symbols.all_static_readonly.required_modifiers = static, readonly
140+
dotnet_naming_rule.all_static_readonly.severity = error
141+
dotnet_naming_rule.all_static_readonly.style = all_static_readonly
142+
dotnet_naming_rule.all_static_readonly.symbols = all_static_readonly
143+
137144
dotnet_naming_style.all_fields.required_prefix = _
138145
dotnet_naming_style.all_fields.capitalization = camel_case
139146
dotnet_naming_symbols.all_fields.applicable_kinds = field
@@ -263,22 +270,26 @@ dotnet_diagnostic.IDE0046.severity = sugges
263270
csharp_style_prefer_primary_constructors = false
264271
dotnet_diagnostic.IDE0290.severity = suggestion
265272

273+
# IDE0060: Remove unused parameter
274+
dotnet_diagnostic.IDE0060.severity = warning
275+
dotnet_diagnostic.RCS1163.severity = none
276+
dotnet_code_quality_unused_parameters = all
277+
266278
# [CSharpier] Incompatible rules deactivated
267279
# https://csharpier.com/docs/IntegratingWithLinters#code-analysis-rules
268280
dotnet_diagnostic.IDE0055.severity = none
269-
dotnet_diagnostic.SA1000.severity = none
270-
dotnet_diagnostic.SA1009.severity = none
271-
dotnet_diagnostic.SA1111.severity = none
272-
dotnet_diagnostic.SA1118.severity = none
273-
dotnet_diagnostic.SA1137.severity = none
274-
dotnet_diagnostic.SA1413.severity = none
275-
dotnet_diagnostic.SA1500.severity = none
276-
dotnet_diagnostic.SA1501.severity = none
277-
dotnet_diagnostic.SA1502.severity = none
278-
dotnet_diagnostic.SA1504.severity = none
279-
dotnet_diagnostic.SA1515.severity = none
280-
dotnet_diagnostic.SA1516.severity = none
281281

282282
# Support for NetEvolve.Arguments Methods
283283
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1062#null-check-validation-methods
284284
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)
285+
286+
# Disable all style rules for generated code
287+
[*.{received,verified}.*]
288+
generated_code = true
289+
# Disable all style rules for migrations
290+
dotnet_analyzer_diagnostic.severity = none
291+
292+
[**/Migrations/*.{cs,csx,vb,vbx}]
293+
generated_code = true
294+
# Disable all style rules for migrations
295+
dotnet_analyzer_diagnostic.severity = none

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
* text=auto eol=lf
2-
* text eol=lf
32

43
# (binary is a macro for -text -diff)
54
*.png binary

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,13 @@ MigrationBackup/
364364
# Prevent nested .editorconfig files - only root .editorconfig should be used
365365
**/.editorconfig
366366
!/.editorconfig
367+
368+
# MemPalace per-project files
369+
.mempalace/
370+
mempalace.yaml
371+
entities.json
372+
373+
# Beads / Dolt files (added by bd init)
374+
.dolt/
375+
*.db
376+
.beads-credential-key

Directory.Packages.props

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55
</PropertyGroup>
66
<ItemGroup>
77
<GlobalPackageReference Include="CSharpier.MSBuild" Version="1.2.6" />
8+
<GlobalPackageReference Include="Meziantou.Analyzer" Version="3.0.77" />
89
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
910
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.203" />
1011
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.203" />
1112
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
12-
<GlobalPackageReference Include="NetEvolve.Defaults" Version="2.3.1" />
13+
<GlobalPackageReference Include="NetEvolve.Defaults" Version="2.6.0" />
14+
<GlobalPackageReference Include="Roslynator.Analyzers" Version="4.15.0" />
15+
<GlobalPackageReference Include="Roslynator.Formatting.Analyzers" Version="4.15.0" />
16+
<GlobalPackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.15.0" />
17+
<GlobalPackageReference Include="Roslynator.CodeFixes" Version="4.15.0" />
18+
<GlobalPackageReference Include="Roslynator.Refactorings" Version="4.15.0" />
1319
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="10.25.0.139117" />
1420
</ItemGroup>
1521
<ItemGroup>

tests/NetEvolve.Logging.Abstractions.Tests.Unit/NullExternalScopeProviderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public async Task ForEachScope_DoNothing_NoExceptionIsThrown()
2121
{
2222
// Arrange
2323
var provider = NullExternalScopeProvider.Instance;
24-
var state = new Dictionary<string, object?> { { "Hello World!", null } };
24+
var state = new Dictionary<string, object?>(StringComparer.Ordinal) { { "Hello World!", null } };
2525

2626
// Act
2727
_ = await Assert.That(() => provider.ForEachScope((_, _) => { }, state)).ThrowsNothing();

0 commit comments

Comments
 (0)