Skip to content

Commit

Permalink
Added EditorConfig file.
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferStrube committed Mar 9, 2024
1 parent 830e08f commit 88c975e
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 5 deletions.
94 changes: 94 additions & 0 deletions .EditorConfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
[*]
# All files
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_property = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_event = false
dotnet_diagnostic.IDE0003.severity = warning
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
dotnet_diagnostic.IDE0049.severity = suggestion
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
dotnet_diagnostic.IDE0036.severity = error
dotnet_style_require_accessibility_modifiers = always
dotnet_diagnostic.IDE0040.severity = warning
dotnet_style_readonly_field = true
dotnet_diagnostic.IDE0044.severity = error
csharp_prefer_static_local_function = true
dotnet_diagnostic.IDE0062.severity = warning
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_diagnostic.IDE0047.severity = warning
dotnet_diagnostic.IDE0048.severity = warning
dotnet_diagnostic.IDE0010.severity = error
dotnet_style_object_initializer = true
dotnet_diagnostic.IDE0017.severity = suggestion
csharp_style_inlined_variable_declaration = true
dotnet_diagnostic.IDE0018.severity = suggestion
dotnet_style_collection_initializer = true
dotnet_diagnostic.IDE0028.severity = warning
dotnet_style_prefer_auto_properties = true
dotnet_diagnostic.IDE0032.severity = suggestion
dotnet_style_explicit_tuple_names = true
dotnet_diagnostic.IDE0033.severity = warning
csharp_prefer_simple_default_expression = false
dotnet_diagnostic.IDE0034.severity = warning
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_diagnostic.IDE0037.severity = suggestion
csharp_style_prefer_local_over_anonymous_function = true
dotnet_diagnostic.IDE0039.severity = warning
csharp_style_deconstructed_variable_declaration = true
dotnet_diagnostic.IDE0042.severity = suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_diagnostic.IDE0045.severity = warning
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_diagnostic.IDE0046.severity = warning
dotnet_style_prefer_compound_assignment = true
dotnet_diagnostic.IDE0054.severity = warning
dotnet_diagnostic.IDE0074.severity = warning
csharp_style_prefer_index_operator = true
dotnet_diagnostic.IDE0056.severity = warning
csharp_style_prefer_range_operator = true
dotnet_diagnostic.IDE0057.severity = warning
dotnet_diagnostic.IDE0070.severity = error
dotnet_style_prefer_simplified_interpolation = true
dotnet_diagnostic.IDE0071.severity = warning
dotnet_diagnostic.IDE0072.severity = error
dotnet_style_prefer_simplified_boolean_expressions = true
dotnet_diagnostic.IDE0075.severity = warning
dotnet_diagnostic.IDE0082.severity = error
csharp_style_implicit_object_creation_when_type_is_apparent = true
dotnet_diagnostic.IDE0090.severity = error
dotnet_diagnostic.IDE0180.severity = warning
csharp_style_namespace_declarations = file_scoped
dotnet_diagnostic.IDE0160.severity = error
dotnet_diagnostic.IDE0161.severity = error
csharp_style_throw_expression = true
dotnet_diagnostic.IDE0016.severity = warning
dotnet_style_coalesce_expression = true
dotnet_diagnostic.IDE0029.severity = warning
dotnet_diagnostic.IDE0030.severity = warning
dotnet_style_null_propagation = true
dotnet_diagnostic.IDE0031.severity = warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_diagnostic.IDE0041.severity = warning
csharp_style_prefer_null_check_over_type_check = true
dotnet_diagnostic.IDE0150.severity = warning
csharp_style_conditional_delegate_call = false
dotnet_diagnostic.IDE1005.severity = warning
csharp_style_var_for_built_in_types = false
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = false
dotnet_diagnostic.IDE0007.severity = warning
dotnet_diagnostic.IDE0008.severity = warning
dotnet_diagnostic.IDE0001.severity = error
dotnet_diagnostic.IDE0002.severity = error
dotnet_diagnostic.IDE0004.severity = error
dotnet_diagnostic.IDE0005.severity = error
dotnet_diagnostic.IDE0035.severity = warning
dotnet_diagnostic.IDE0051.severity = warning
dotnet_diagnostic.IDE0052.severity = warning
csharp_style_unused_value_expression_statement_preference = discard_variable
dotnet_diagnostic.IDE0058.severity = warning
csharp_style_unused_value_assignment_preference = discard_variable
dotnet_diagnostic.IDE0059.severity = warning
10 changes: 5 additions & 5 deletions src/KristofferStrube.Blazor.WebIDL/IReadonlySetlike.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ public static async Task<Iterator<Pair>> EntriesAsync<TSet>(this TSet set) where
public static async Task ForEachAsync<TSet>(this TSet set, Func<Task> function) where TSet : IReadonlySetlike<TSet>

Check warning on line 14 in src/KristofferStrube.Blazor.WebIDL/IReadonlySetlike.cs

View workflow job for this annotation

GitHub Actions / build

Missing XML comment for publicly visible type or member 'IReadonlySetlikeExtensions.ForEachAsync<TSet>(TSet, Func<Task>)'
{
Callback callback = new(function);
using DotNetObjectReference<Callback> callbackObjRef = DotNetObjectReference.Create(callback);
using var callbackObjRef = DotNetObjectReference.Create(callback);
IJSObjectReference helper = await set.JSRuntime.GetHelperAsync();
await helper.InvokeVoidAsync("forEachWithNoArguments", set, callbackObjRef);
}

public static async Task ForEachAsync<TSet, T>(this TSet set, Func<T, Task> function) where TSet : IReadonlySetlike<TSet> where T : IJSCreatable<T>

Check warning on line 22 in src/KristofferStrube.Blazor.WebIDL/IReadonlySetlike.cs

View workflow job for this annotation

GitHub Actions / build

Missing XML comment for publicly visible type or member 'IReadonlySetlikeExtensions.ForEachAsync<TSet, T>(TSet, Func<T, Task>)'
{
Callback<T> callback = new(set.JSRuntime, function);
using DotNetObjectReference<Callback<T>> callbackObjRef = DotNetObjectReference.Create(callback);
using var callbackObjRef = DotNetObjectReference.Create(callback);
IJSObjectReference helper = await set.JSRuntime.GetHelperAsync();
await helper.InvokeVoidAsync("forEachWithOneArgument", set, callbackObjRef);
}

public static async Task ForEachAsync<TSet, T>(this TSet set, Func<T, T, Task> function) where TSet : IReadonlySetlike<TSet> where T : IJSCreatable<T>

Check warning on line 30 in src/KristofferStrube.Blazor.WebIDL/IReadonlySetlike.cs

View workflow job for this annotation

GitHub Actions / build

Missing XML comment for publicly visible type or member 'IReadonlySetlikeExtensions.ForEachAsync<TSet, T>(TSet, Func<T, T, Task>)'
{
Callback<T, T> callback = new(set.JSRuntime, function);
using DotNetObjectReference<Callback<T, T>> callbackObjRef = DotNetObjectReference.Create(callback);
using var callbackObjRef = DotNetObjectReference.Create(callback);
IJSObjectReference helper = await set.JSRuntime.GetHelperAsync();
await helper.InvokeVoidAsync("forEachWithTwoArguments", set, callbackObjRef);
}
Expand Down Expand Up @@ -67,15 +67,15 @@ public static class IReadonlySetlikeStructExtensions
public static async Task ForEachAsync<TSet, T>(this TSet set, Func<T, Task> function) where TSet : IReadonlySetlike<TSet> where T : struct
{
StructCallback<T> callback = new(function);
using DotNetObjectReference<StructCallback<T>> callbackObjRef = DotNetObjectReference.Create(callback);
using var callbackObjRef = DotNetObjectReference.Create(callback);
IJSObjectReference helper = await set.JSRuntime.GetHelperAsync();
await helper.InvokeVoidAsync("forEachWithOneStructArgument", set, callbackObjRef);
}

public static async Task ForEachAsync<TSet, T>(this TSet set, Func<T, T, Task> function) where TSet : IReadonlySetlike<TSet> where T : struct
{
StructCallback<T, T> callback = new(function);
using DotNetObjectReference<StructCallback<T, T>> callbackObjRef = DotNetObjectReference.Create(callback);
using var callbackObjRef = DotNetObjectReference.Create(callback);
IJSObjectReference helper = await set.JSRuntime.GetHelperAsync();
await helper.InvokeVoidAsync("forEachWithTwoStructArguments", set, callbackObjRef);
}
Expand Down

0 comments on commit 88c975e

Please sign in to comment.