Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Oct 12, 2023
1 parent 9e47661 commit 1d41401
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 35 deletions.
8 changes: 5 additions & 3 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,17 @@ resharper_wrap_before_binary_pattern_op = false
resharper_wrap_object_and_collection_initializer_style = chop_always
resharper_place_simple_initializer_on_single_line = false

# space
resharper_space_around_lambda_arrow = true

dotnet_style_require_accessibility_modifiers = never:error
resharper_place_type_constraints_on_same_line = false
resharper_blank_lines_inside_namespace = 0
resharper_blank_lines_after_file_scoped_namespace_directive = 1
resharper_blank_lines_inside_type = 0

insert_final_newline = false
resharper_place_attribute_on_same_line = false
resharper_space_around_lambda_arrow = true
resharper_place_constructor_initializer_on_same_line = false

#braces https://www.jetbrains.com/help/resharper/EditorConfig_CSHARP_CSharpCodeStylePageImplSchema.html#Braces
resharper_braces_for_ifelse = required
resharper_braces_for_foreach = required
Expand Down
5 changes: 4 additions & 1 deletion src/Shared.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MergeIntoPattern/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MergeNestedPropertyPatterns/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MergeSequentialChecks/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MoveLocalFunctionAfterJumpStatement/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=NotAccessedField_002ELocal/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=NotAccessedPositionalProperty_002ELocal/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PatternIsAlwaysTrueOrFalse/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantAssignment/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantBoolCompare/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantStringInterpolation/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RawStringCanBeSimplified/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantTypeDeclarationBody/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantUsingDirective_002EGlobal/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceAsyncWithTaskReturn/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SeparateLocalFunctionsWithJumpStatement/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralAsInterpolationArgument/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=TryStatementsCanBeMerged/@EntryIndexedValue">ERROR</s:String>
Expand All @@ -42,6 +44,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=TabsAreDisallowed/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseRawString/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseSwitchCasePatternVariable/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseSymbolAlias/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseUtf8StringLiteral/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Browsers/Browsers/@EntryValue">C90+,E79+,S14+</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConditionalAccessQualifierIsNonNullableAccordingToAPIContract/@EntryIndexedValue">ERROR</s:String>
Expand Down
9 changes: 2 additions & 7 deletions src/Verify.Blazor/ComponentInfo.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using Microsoft.AspNetCore.Components;

class ComponentInfo
class ComponentInfo(ComponentBase instance)
{
public ComponentBase Instance { get; }

public ComponentInfo(ComponentBase instance) =>
Instance = instance;
public ComponentBase Instance { get; } = instance;
}
3 changes: 1 addition & 2 deletions src/Verify.Blazor/ContainerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.AspNetCore.Components.Rendering;

// This provides the ability for test code to trigger rendering at arbitrary times,
// and to supply arbitrary parameters to the component being tested (including ones
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Blazor/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Global using directives

global using Microsoft.AspNetCore.Components;
3 changes: 1 addition & 2 deletions src/Verify.Blazor/Render.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

namespace VerifyTests.Blazor;
Expand Down
1 change: 0 additions & 1 deletion src/Verify.Blazor/TestRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.ExceptionServices;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.Extensions.Logging;

Expand Down
3 changes: 1 addition & 2 deletions src/Verify.Blazor/VerifyBlazor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using VerifyTests.Blazor;

Expand Down
20 changes: 12 additions & 8 deletions src/Verify.Bunit.Tests/Samples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public Task Nested()
builder =>
{
builder.Add(_ => _.Title, "New Title");
builder.Add(_ => _.Person, new()
{
Name = "Sam"
});
builder.Add(
_ => _.Person,
new()
{
Name = "Sam"
});
});

return Verify(
Expand All @@ -56,10 +58,12 @@ public async Task WaitForState()
builder =>
{
builder.Add(_ => _.Title, "New Title");
builder.Add(_ => _.Person, new()
{
Name = "Sam"
});
builder.Add(
_ => _.Person,
new()
{
Name = "Sam"
});
},
_ => _.Intitialized);
await Verify(component);
Expand Down
3 changes: 1 addition & 2 deletions src/Verify.Bunit/ComponentReader.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Bunit;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;

static class ComponentReader
{
Expand Down
4 changes: 1 addition & 3 deletions src/Verify.Bunit/FragmentToStream.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Bunit;

static class FragmentToStream
static class FragmentToStream
{
public static ConversionResult Convert(IRenderedFragment fragment, IReadOnlyDictionary<string, object> context)
{
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Bunit/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Global using directives

global using Bunit;
4 changes: 1 addition & 3 deletions src/Verify.Bunit/RenderedFragmentConverter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Bunit;

class RenderedFragmentConverter :
class RenderedFragmentConverter :
WriteOnlyJsonConverter<IRenderedFragment>
{
public override void Write(VerifyJsonWriter writer, IRenderedFragment fragment)
Expand Down
1 change: 0 additions & 1 deletion src/Verify.Bunit/VerifyBunit.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AngleSharp.Dom;
using Bunit;
using Bunit.Extensions.WaitForHelpers;
using Microsoft.AspNetCore.Components;

Expand Down

0 comments on commit 1d41401

Please sign in to comment.