Skip to content
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

Update .editorconfig from 2.1.0 to 3.0.0 #376

Merged
merged 2 commits into from
Aug 11, 2021
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
13 changes: 8 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version: 2.1.0 (Using https://semver.org/)
# Updated: 2021-03-03
# Version: 3.0.0 (Using https://semver.org/)
# Updated: 2021-08-09
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
# See http://EditorConfig.org for more information about .editorconfig files.
Expand Down Expand Up @@ -48,7 +48,7 @@ indent_size = 2
trim_trailing_whitespace = false

# Web Files
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}]
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,pcss,svg,vue}]
indent_size = 2

# Batch Files
Expand Down Expand Up @@ -97,7 +97,7 @@ dotnet_style_readonly_field = true:warning
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
# Expression-level preferences
dotnet_style_object_initializer = true:warning
dotnet_style_collection_initializer = true:warning
Expand All @@ -121,7 +121,10 @@ dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
# If you use StyleCop, you'll need to disable SA1636: File header copyright text should match.
# dotnet_diagnostic.SA1636.severity = none
# Undocumented
dotnet_style_operator_placement_when_wrapping = end_of_line
dotnet_style_operator_placement_when_wrapping = end_of_line:warning
csharp_style_prefer_null_check_over_type_check = true:warning
dotnet_style_namespace_match_folder = true:suggestion
dotnet_diagnostic.IDE0130.severity = suggestion

# C# Style Rules
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using System;
using System.Runtime.CompilerServices;

[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup Label="Build">
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<Nullable>enable</Nullable>
<NeutralLanguage>en-GB</NeutralLanguage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ public override void Destructure(
var dbUpdateException = (DbUpdateException)exception;
var entriesValue = dbUpdateException.Entries?
.Select(
#pragma warning disable IDE0050 // Convert to tuple
e => new
#pragma warning restore IDE0050 // Convert to tuple
{
EntryProperties = e.Properties.Select(
#pragma warning disable IDE0050 // Convert to tuple
p => new
#pragma warning restore IDE0050 // Convert to tuple
{
PropertyName = p.Metadata.Name,
p.OriginalValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Runtime.CompilerServices;
using System;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Runtime.CompilerServices;
using System;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Runtime.CompilerServices;
using System;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ internal static object DestructureTask(

if (task.IsFaulted && task.Exception is not null)
{
#pragma warning disable IDE0050 // Convert to tuple
return new
#pragma warning restore IDE0050 // Convert to tuple
{
task.Id,
Status = taskStatus,
Expand All @@ -65,9 +63,7 @@ internal static object DestructureTask(
};
}

#pragma warning disable IDE0050 // Convert to tuple
return new
#pragma warning restore IDE0050 // Convert to tuple
{
task.Id,
Status = taskStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public class CompositeExceptionPropertyFilter : IExceptionPropertyFilter
/// <exception cref="ArgumentException">filters was empty or filter at index {i} is <c>null</c>.</exception>
public CompositeExceptionPropertyFilter(params IExceptionPropertyFilter[] filters)
{
#pragma warning disable CA1508 // This warning should not occur and is fixed in .NET 6.
if (filters is null)
#pragma warning restore CA1508 // This warning should not occur and is fixed in .NET 6.
{
throw new ArgumentNullException(nameof(filters));
}
Expand Down
6 changes: 4 additions & 2 deletions Source/Serilog.Exceptions/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Runtime.CompilerServices;
using System;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ public void MarkNameWithTypeNameIfRedefinesThatProperty(ReflectionPropertyInfo o
}
}

#pragma warning disable CA1801 // This warning should not occur and is fixed in .NET 6.
private static bool IsSubTypeOf(Type possibleSubType, Type possibleBaseType) =>
#pragma warning restore CA1801 // This warning should not occur and is fixed in .NET 6.
#if NETSTANDARD1_3 || NETSTANDARD1_6
possibleBaseType.GetTypeInfo().IsSubclassOf(possibleBaseType);
#else
Expand Down
2 changes: 1 addition & 1 deletion Source/Serilog.Exceptions/TypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ public static TypeCode GetTypeCode(this Type type)
public static TypeCode GetTypeCode(this Type type) => Type.GetTypeCode(type);
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace Serilog.Exceptions.Test.Destructurers
using Serilog.Exceptions.Core;
using Serilog.Exceptions.Destructurers;
using Xunit;
using Xunit.Abstractions;
using static LogJsonOutputUtils;

public class ReflectionBasedDestructurerTest
Expand Down
5 changes: 5 additions & 0 deletions Tests/Serilog.Exceptions.Test/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using System;
using System.Runtime.CompilerServices;

[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]
5 changes: 5 additions & 0 deletions Tools/ExceptionFinderTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using System;
using System.Runtime.CompilerServices;

[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("Serilog.Exceptions.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007320f17cde01a37b8b3dff91961943f76893c63352544608de15974586e17739e0b232cdc8cc8762b40d988a21522024abca8116605ed1c8958f350bc6ca4594aa1ca61c1906d85ee76df8d9b404ffd65a5f6efeddd486bddd5b74ff9a7449af0dc9d43da753a3023b20ca616e8313e82a18719b6551f37c45c8d8e4e4cf9bac")]