Skip to content

Resharper tweaks #1413

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 2 commits into from
Dec 2, 2023
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
1 change: 1 addition & 0 deletions WarningSeverities.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=NestedStringInterpolation/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=NotAccessedField_002EGlobal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=OutdentIsOffPrevLevel/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PropertyCanBeMadeInitOnly_002EGlobal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PropertyCanBeMadeInitOnly_002ELocal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PublicConstructorInAbstractClass/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RawStringCanBeSimplified/@EntryIndexedValue">WARNING</s:String>
Expand Down
2 changes: 2 additions & 0 deletions src/JsonApiDotNetCore/Serialization/Objects/Document.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace JsonApiDotNetCore.Serialization.Objects;

/// <summary>
/// See https://jsonapi.org/format#document-top-level and https://jsonapi.org/ext/atomic/#document-structure.
/// </summary>
[PublicAPI]
public sealed class Document
{
[JsonPropertyName("jsonapi")]
Expand Down
2 changes: 2 additions & 0 deletions test/DapperTests/IntegrationTests/FrozenClock.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using DapperExample;
using FluentAssertions.Extensions;
using JetBrains.Annotations;

namespace DapperTests.IntegrationTests;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
internal sealed class FrozenClock : IClock
{
private static readonly DateTimeOffset DefaultTime = 1.January(2020).At(1, 1, 1).AsUtc();
Expand Down
29 changes: 8 additions & 21 deletions test/UnitTests/Internal/ErrorObjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,15 @@ namespace UnitTests.Internal;

public sealed class ErrorObjectTests
{
// Formatting below is broken due to Resharper bug at https://youtrack.jetbrains.com/issue/RSRP-494897/Formatter-directive-broken-in-2023.3-EAP7.
// This no longer works: @formatter:wrap_array_initializer_style wrap_if_long
// @formatter:wrap_array_initializer_style wrap_if_long
// @formatter:max_array_initializer_elements_on_line 10
[Theory]
[InlineData(new[]
{
HttpStatusCode.UnprocessableEntity
}, HttpStatusCode.UnprocessableEntity)]
[InlineData(new[]
{
HttpStatusCode.UnprocessableEntity,
HttpStatusCode.UnprocessableEntity
}, HttpStatusCode.UnprocessableEntity)]
[InlineData(new[]
{
HttpStatusCode.UnprocessableEntity,
HttpStatusCode.Unauthorized
}, HttpStatusCode.BadRequest)]
[InlineData(new[]
{
HttpStatusCode.UnprocessableEntity,
HttpStatusCode.BadGateway
}, HttpStatusCode.InternalServerError)]
[InlineData(new[] { HttpStatusCode.UnprocessableEntity }, HttpStatusCode.UnprocessableEntity)]
[InlineData(new[] { HttpStatusCode.UnprocessableEntity, HttpStatusCode.UnprocessableEntity }, HttpStatusCode.UnprocessableEntity)]
[InlineData(new[] { HttpStatusCode.UnprocessableEntity, HttpStatusCode.Unauthorized }, HttpStatusCode.BadRequest)]
[InlineData(new[] { HttpStatusCode.UnprocessableEntity, HttpStatusCode.BadGateway }, HttpStatusCode.InternalServerError)]
// @formatter:max_array_initializer_elements_on_line restore
// @formatter:wrap_array_initializer_style restore
public void ErrorDocument_GetErrorStatusCode_IsCorrect(HttpStatusCode[] errorCodes, HttpStatusCode expected)
{
// Arrange
Expand Down