Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -263,6 +270,11 @@ 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
Expand Down
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<PackageReleaseNotes>$(RepositoryUrl)/releases</PackageReleaseNotes>
<PackageTags>fluent;value;validation;</PackageTags>
<CopyrightYearStart>2024</CopyrightYearStart>

<DisableRecommendedPackage>Meziantou.Analyzer</DisableRecommendedPackage>
</PropertyGroup>
<PropertyGroup>
<NetEvolve_ProjectTargetFrameworks>net8.0;net9.0;net10.0</NetEvolve_ProjectTargetFrameworks>
Expand Down
7 changes: 6 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.202" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.202" />
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
<GlobalPackageReference Include="NetEvolve.Defaults" Version="2.3.1" />
<GlobalPackageReference Include="NetEvolve.Defaults" Version="2.4.0" />
<GlobalPackageReference Include="Roslynator.Analyzers" Version="4.15.0" />
<GlobalPackageReference Include="Roslynator.Formatting.Analyzers" Version="4.15.0" />
<GlobalPackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.15.0" />
<GlobalPackageReference Include="Roslynator.CodeFixes" Version="4.15.0" />
<GlobalPackageReference Include="Roslynator.Refactorings" Version="4.15.0" />
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="10.23.0.137933" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/NetEvolve.FluentValue/Constraints/ConstraintBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal abstract class ConstraintBase : IConstraint
/// <inheritdoc />
public abstract void SetDescription(StringBuilder builder);

/// <inhertdoc />
/// <inheritdoc cref="object.Equals(object?)" />
[Obsolete("This is base `object` method that should not be called.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
Expand Down
14 changes: 12 additions & 2 deletions tests/NetEvolve.FluentValue.Tests.Unit/ConstraintTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,18 @@ public async Task Value_Theory_Expected(bool expected, IConstraint constraint, o
() => (true, Value.Contains("Hello"), "Hello World!"),
() => (false, Value.Contains('Z', Ordinal), "Hello World!"),
() => (true, Value.Contains('W'), "Hello World!"),
() => (false, Value.Contains(2), new Dictionary<string, object> { { "Hello", "World!" } }),
() => (true, Value.Contains("Hello"), new Dictionary<string, object> { { "Hello", "World!" } }),
() =>
(
false,
Value.Contains(2),
new Dictionary<string, object>(StringComparer.Ordinal) { { "Hello", "World!" } }
),
() =>
(
true,
Value.Contains("Hello"),
new Dictionary<string, object>(StringComparer.Ordinal) { { "Hello", "World!" } }
),
() => (false, Value.Contains(2), new List<string> { "Hello", "World!" }),
() => (true, Value.Contains("World!"), new List<string> { "Hello", "World!" }),
() => (false, Value.Contains(2), Enumerable.Range(10, 10)),
Expand Down
Loading