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
6 changes: 3 additions & 3 deletions .csharpierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**/nuget.config
**/_snapshots/
**/_snapshot/
**/[Nn]u[Gg]et.config
**/*.verified.*
**/*.received.*
31 changes: 15 additions & 16 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -266,19 +266,18 @@ dotnet_diagnostic.IDE0290.severity = sugges
# [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
6 changes: 6 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ on:
- detailed
- diagnostic

permissions:
actions: read
contents: write
pull-requests: write
security-events: write

jobs:
all:
if: github.run_id != 1
Expand Down
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="10.21.0.135717" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.5.2" />
<PackageVersion Include="NetEvolve.Arguments" Version="3.2.84" />
Expand Down
1 change: 0 additions & 1 deletion src/NetEvolve.FluentValue/Constraints/ConstraintBase.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace NetEvolve.FluentValue.Constraints;

using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace NetEvolve.FluentValue.Constraints;

using System;
using System.Text;
using NetEvolve.FluentValue;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace NetEvolve.FluentValue.Constraints;

using System.Text;
using NetEvolve.Arguments;
using NetEvolve.FluentValue;

internal sealed class ParenthesisConstraint : ConstraintBase
Expand All @@ -10,14 +9,14 @@ internal sealed class ParenthesisConstraint : ConstraintBase

internal ParenthesisConstraint(IConstraint constraint)
{
Argument.ThrowIfNull(constraint);
ArgumentNullException.ThrowIfNull(constraint);

_constraint = (ConstraintBase)constraint;
}

public override bool IsSatisfiedBy(object? value)
{
Argument.ThrowIfNull(_constraint);
ArgumentNullException.ThrowIfNull(_constraint);

return _constraint.IsSatisfiedBy(value);
}
Expand Down
5 changes: 2 additions & 3 deletions src/NetEvolve.FluentValue/Operators/AndOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using System;
using System.Text;
using NetEvolve.Arguments;
using NetEvolve.FluentValue;
using NetEvolve.FluentValue.Constraints;

Expand All @@ -13,7 +12,7 @@ internal sealed class AndOperator : ConstraintBase, IOperator

internal AndOperator(IConstraint left)
{
Argument.ThrowIfNull(left);
ArgumentNullException.ThrowIfNull(left);

_left = left;
}
Expand All @@ -30,7 +29,7 @@ public override bool IsSatisfiedBy(object? value)

public IConstraint SetConstraint(IConstraint constraint)
{
Argument.ThrowIfNull(constraint);
ArgumentNullException.ThrowIfNull(constraint);

if (_right is NotOperator notOperator)
{
Expand Down
3 changes: 1 addition & 2 deletions src/NetEvolve.FluentValue/Operators/NotOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using System;
using System.Text;
using NetEvolve.Arguments;
using NetEvolve.FluentValue;
using NetEvolve.FluentValue.Constraints;

Expand All @@ -24,7 +23,7 @@ public override bool IsSatisfiedBy(object? value)

public IConstraint SetConstraint(IConstraint constraint)
{
Argument.ThrowIfNull(constraint);
ArgumentNullException.ThrowIfNull(constraint);

_constraint = constraint;

Expand Down
5 changes: 2 additions & 3 deletions src/NetEvolve.FluentValue/Operators/OrOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using System;
using System.Text;
using NetEvolve.Arguments;
using NetEvolve.FluentValue;
using NetEvolve.FluentValue.Constraints;

Expand All @@ -13,7 +12,7 @@ internal sealed class OrOperator : ConstraintBase, IOperator

internal OrOperator(IConstraint left)
{
Argument.ThrowIfNull(left);
ArgumentNullException.ThrowIfNull(left);

_left = left;
}
Expand All @@ -30,7 +29,7 @@ public override bool IsSatisfiedBy(object? value)

public IConstraint SetConstraint(IConstraint constraint)
{
Argument.ThrowIfNull(constraint);
ArgumentNullException.ThrowIfNull(constraint);

if (_right is NotOperator notOperator)
{
Expand Down
5 changes: 2 additions & 3 deletions src/NetEvolve.FluentValue/Operators/XorOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using System;
using System.Text;
using NetEvolve.Arguments;
using NetEvolve.FluentValue;
using NetEvolve.FluentValue.Constraints;

Expand All @@ -13,7 +12,7 @@ internal sealed class XorOperator : ConstraintBase, IOperator

internal XorOperator(IConstraint left)
{
Argument.ThrowIfNull(left);
ArgumentNullException.ThrowIfNull(left);

_left = left;
}
Expand All @@ -30,7 +29,7 @@ public override bool IsSatisfiedBy(object? value)

public IConstraint SetConstraint(IConstraint constraint)
{
Argument.ThrowIfNull(constraint);
ArgumentNullException.ThrowIfNull(constraint);

if (_right is NotOperator notOperator)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<TargetFrameworks>$(NetEvolve_TestTargetFrameworks)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" />
<PackageReference Include="NetEvolve.Extensions.TUnit" />
<PackageReference Include="TUnit" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
namespace NetEvolve.FluentValue.Tests.Unit;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public class TypeExtensionsTests
Expand Down
Loading