Skip to content

Commit

Permalink
add rule 'static_fields_should_be__pascalcase' to .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Dec 9, 2024
1 parent eee4e77 commit acd8fdc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ dotnet_naming_rule.private_fields_should_be__camelcase.severity = warning
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
dotnet_naming_rule.private_fields_should_be__camelcase.style = camelcase

dotnet_naming_rule.static_fields_should_be__pascalcase.severity = warning
dotnet_naming_rule.static_fields_should_be__pascalcase.symbols = static_fields
dotnet_naming_rule.static_fields_should_be__pascalcase.style = pascalcase


# --- Symbol specifications

Expand All @@ -49,10 +53,19 @@ dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected, internal
dotnet_naming_symbols.private_fields.required_modifiers =

dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.static_fields.required_modifiers = static


# --- Naming styles

dotnet_naming_style.camelcase.required_prefix =
dotnet_naming_style.camelcase.required_suffix =
dotnet_naming_style.camelcase.word_separator =
dotnet_naming_style.camelcase.capitalization = camel_case
dotnet_naming_style.camelcase.capitalization = camel_case

dotnet_naming_style.pascalcase.required_prefix =
dotnet_naming_style.pascalcase.required_suffix =
dotnet_naming_style.pascalcase.word_separator =
dotnet_naming_style.pascalcase.capitalization = pascal_case
3 changes: 2 additions & 1 deletion src/ECS/Entity/Store/Entities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using Friflo.Engine.ECS.Serialize;
using static Friflo.Engine.ECS.StoreOwnership;
using static Friflo.Engine.ECS.TreeMembership;

Expand Down Expand Up @@ -126,6 +125,7 @@ public Entity CloneEntity(Entity entity)
return clone;
}

// ReSharper disable once UnusedMember.Local
[ExcludeFromCodeCoverage]
private static void AssertNoError(string error) {
if (error == null) {
Expand All @@ -134,6 +134,7 @@ private static void AssertNoError(string error) {
throw new InvalidOperationException($"unexpected error: {error}");
}

// ReSharper disable once UnusedMember.Local
[ExcludeFromCodeCoverage] // unused - method obsolete
private static bool IsBlittable(Entity original)
{
Expand Down

0 comments on commit acd8fdc

Please sign in to comment.