Skip to content

fix: Disabled warning S6640 #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2025
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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,6 @@ 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)
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19" />
<GlobalPackageReference Include="NetEvolve.Defaults" Version="1.3.28" />
<GlobalPackageReference Include="Roslynator.Analyzers" Version="4.12.9" />
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="10.3.0.106239" Condition=" '$(BuildingInsideVisualStudio)' == 'true' " />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
Expand Down
2 changes: 2 additions & 0 deletions src/NetEvolve.Arguments/Argument_ThrowIfNull.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public static void ThrowIfNull(
#else
[MethodImpl(MethodImplOptions.NoInlining)]
#endif
#pragma warning disable S6640 // Make sure that using "unsafe" is safe here.
public static unsafe void ThrowIfNull(
#pragma warning restore S6640 // Make sure that using "unsafe" is safe here.
[NotNull] void* argument,
[CallerArgumentExpression(nameof(argument))] string? paramName = null
)
Expand Down
Loading