Skip to content

Commit

Permalink
Improve coding standards. Update '.editorconfig' file
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitrietataru committed May 30, 2024
1 parent c8a3a9b commit 7833e66
Show file tree
Hide file tree
Showing 57 changed files with 180 additions and 180 deletions.
92 changes: 46 additions & 46 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -327,32 +327,32 @@ dotnet_naming_rule.variable_should_be_camel_case.style = camel_case
# Code Style | Naming | Specifications | Interface
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.interface.required_modifiers =

# Code Style | Naming | Specifications | Class
dotnet_naming_symbols.class.applicable_kinds = class
dotnet_naming_symbols.class.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.class.required_modifiers =
dotnet_naming_symbols.class.required_modifiers =

# Code Style | Naming | Specifications | Struct
dotnet_naming_symbols.struct.applicable_kinds = struct
dotnet_naming_symbols.struct.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.struct.required_modifiers =
dotnet_naming_symbols.struct.required_modifiers =

# Code Style | Naming | Specifications | Enum
dotnet_naming_symbols.enum.applicable_kinds = enum
dotnet_naming_symbols.enum.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.enum.required_modifiers =
dotnet_naming_symbols.enum.required_modifiers =

# Code Style | Naming | Specifications | Type (Interface, Class, Struct, Enum)
dotnet_naming_symbols.type.applicable_kinds = interface, class, struct, enum
dotnet_naming_symbols.type.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.type.required_modifiers =
dotnet_naming_symbols.type.required_modifiers =

# Code Style | Naming | Specifications | Method
dotnet_naming_symbols.method.applicable_kinds = method
dotnet_naming_symbols.method.applicable_accessibilities = *
dotnet_naming_symbols.method.required_modifiers =
dotnet_naming_symbols.method.required_modifiers =

# Code Style | Naming | Specifications | Method | Async
dotnet_naming_symbols.method_async.applicable_kinds = method
Expand All @@ -362,7 +362,7 @@ dotnet_naming_symbols.method_async.required_modifiers = async
# Code Style | Naming | Specifications | Local Function
dotnet_naming_symbols.local_function.applicable_kinds = local_function
dotnet_naming_symbols.local_function.applicable_accessibilities = local
dotnet_naming_symbols.local_function.required_modifiers =
dotnet_naming_symbols.local_function.required_modifiers =

# Code Style | Naming | Specifications | Local Function | Async
dotnet_naming_symbols.local_function_async.applicable_kinds = local_function
Expand All @@ -372,17 +372,17 @@ dotnet_naming_symbols.local_function_async.required_modifiers = async
# Code Style | Naming | Specifications | Property
dotnet_naming_symbols.property.applicable_kinds = property
dotnet_naming_symbols.property.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.property.required_modifiers =
dotnet_naming_symbols.property.required_modifiers =

# Code Style | Naming | Specifications | Event
dotnet_naming_symbols.event.applicable_kinds = event
dotnet_naming_symbols.event.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.event.required_modifiers =
dotnet_naming_symbols.event.required_modifiers =

# Code Style | Naming | Specifications | Delegate
dotnet_naming_symbols.delegate.applicable_kinds = delegate
dotnet_naming_symbols.delegate.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.delegate.required_modifiers =
dotnet_naming_symbols.delegate.required_modifiers =

# Code Style | Naming | Specifications | Static field | Public/Internal
dotnet_naming_symbols.visible_static_field.applicable_kinds = field
Expand All @@ -392,22 +392,22 @@ dotnet_naming_symbols.visible_static_field.required_modifiers = static
# Code Style | Naming | Specifications | Field
dotnet_naming_symbols.field.applicable_kinds = field
dotnet_naming_symbols.field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.field.required_modifiers =
dotnet_naming_symbols.field.required_modifiers =

# Code Style | Naming | Specifications | Field | Private
dotnet_naming_symbols.field_private.applicable_kinds = field
dotnet_naming_symbols.field_private.applicable_accessibilities = private, private_protected
dotnet_naming_symbols.field_private.required_modifiers =
dotnet_naming_symbols.field_private.required_modifiers =

# Code Style | Naming | Specifications | Parameter
dotnet_naming_symbols.parameter.applicable_kinds = parameter
dotnet_naming_symbols.parameter.applicable_accessibilities = *
dotnet_naming_symbols.parameter.required_modifiers =
dotnet_naming_symbols.parameter.required_modifiers =

# Code Style | Naming | Specifications | Variable
dotnet_naming_symbols.variable.applicable_kinds = local
dotnet_naming_symbols.variable.applicable_accessibilities = local
dotnet_naming_symbols.variable.required_modifiers =
dotnet_naming_symbols.variable.required_modifiers =

# Code Style | Naming | Specifications | Const
dotnet_naming_symbols.const.applicable_kinds = *
Expand All @@ -427,60 +427,60 @@ dotnet_naming_symbols.const_local.required_modifiers = const
# Code Style | Naming | Specifications | Generic Parameter
dotnet_naming_symbols.generic_parameter.applicable_kinds = type_parameter
dotnet_naming_symbols.generic_parameter.applicable_accessibilities = *
dotnet_naming_symbols.generic_parameter.required_modifiers =
dotnet_naming_symbols.generic_parameter.required_modifiers =

# Code Style | Naming | Styles | Pascal Case
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

# Code Style | Naming | Styles | Camel Case
dotnet_naming_style.camel_case.required_prefix =
dotnet_naming_style.camel_case.required_suffix =
dotnet_naming_style.camel_case.word_separator =
dotnet_naming_style.camel_case.required_prefix =
dotnet_naming_style.camel_case.required_suffix =
dotnet_naming_style.camel_case.word_separator =
dotnet_naming_style.camel_case.capitalization = camel_case

# Code Style | Naming | Styles | Upper Case
#dotnet_naming_style.upper_case.required_prefix =
#dotnet_naming_style.upper_case.required_suffix =
#dotnet_naming_style.upper_case.word_separator =
#dotnet_naming_style.upper_case.required_prefix =
#dotnet_naming_style.upper_case.required_suffix =
#dotnet_naming_style.upper_case.word_separator =
#dotnet_naming_style.upper_case.capitalization = all_upper

# Code Style | Naming | Styles | Snake Case
#dotnet_naming_style.snake_case.required_prefix =
#dotnet_naming_style.snake_case.required_suffix =
#dotnet_naming_style.snake_case.required_prefix =
#dotnet_naming_style.snake_case.required_suffix =
#dotnet_naming_style.snake_case.word_separator = _
#dotnet_naming_style.snake_case.capitalization = all_lower

# Code Style | Naming | Styles | Upper Snake Case
dotnet_naming_style.upper_snake_case.required_prefix =
dotnet_naming_style.upper_snake_case.required_suffix =
dotnet_naming_style.upper_snake_case.required_prefix =
dotnet_naming_style.upper_snake_case.required_suffix =
dotnet_naming_style.upper_snake_case.word_separator = _
dotnet_naming_style.upper_snake_case.capitalization = all_upper

# Code Style | Naming | Styles | Begins with I
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

# Code Style | Naming | Styles | Begins with T
dotnet_naming_style.begins_with_t.required_prefix = T
dotnet_naming_style.begins_with_t.required_suffix =
dotnet_naming_style.begins_with_t.word_separator =
dotnet_naming_style.begins_with_t.required_suffix =
dotnet_naming_style.begins_with_t.word_separator =
dotnet_naming_style.begins_with_t.capitalization = pascal_case

# Code Style | Naming | Styles | Begins with Underscore
dotnet_naming_style.begins_with_underscore.required_prefix = _
dotnet_naming_style.begins_with_underscore.required_suffix =
dotnet_naming_style.begins_with_underscore.word_separator =
dotnet_naming_style.begins_with_underscore.required_suffix =
dotnet_naming_style.begins_with_underscore.word_separator =
dotnet_naming_style.begins_with_underscore.capitalization = camel_case

# Code Style | Naming | Styles | Ends with Async
dotnet_naming_style.ends_with_async.required_prefix =
dotnet_naming_style.ends_with_async.required_prefix =
dotnet_naming_style.ends_with_async.required_suffix = Async
dotnet_naming_style.ends_with_async.word_separator =
dotnet_naming_style.ends_with_async.word_separator =
dotnet_naming_style.ends_with_async.capitalization = pascal_case

# Microsoft.CodeAnalysis.NetAnalyzers | Design
Expand Down Expand Up @@ -721,12 +721,12 @@ dotnet_diagnostic.CA5358.severity = warning
dotnet_diagnostic.CA5359.severity = warning
dotnet_diagnostic.CA5360.severity = warning
dotnet_diagnostic.CA5361.severity = warning
dotnet_diagnostic.CA5362.severity = suggestion
dotnet_diagnostic.CA5362.severity = suggestion
dotnet_diagnostic.CA5363.severity = warning
dotnet_diagnostic.CA5364.severity = warning
dotnet_diagnostic.CA5365.severity = warning
dotnet_diagnostic.CA5366.severity = warning
dotnet_diagnostic.CA5367.severity = error
dotnet_diagnostic.CA5367.severity = error
dotnet_diagnostic.CA5368.severity = warning
dotnet_diagnostic.CA5369.severity = warning
dotnet_diagnostic.CA5370.severity = warning
Expand Down Expand Up @@ -767,7 +767,7 @@ dotnet_diagnostic.CA5404.severity = warning
dotnet_diagnostic.CA5405.severity = warning

# Microsoft.CodeAnalysis.NetAnalyzers | Usage
dotnet_diagnostic.CA1816.severity = suggestion
dotnet_diagnostic.CA1816.severity = suggestion
dotnet_diagnostic.CA2200.severity = warning
dotnet_diagnostic.CA2201.severity = warning
dotnet_diagnostic.CA2207.severity = warning
Expand All @@ -777,7 +777,7 @@ dotnet_diagnostic.CA2213.severity = warning
dotnet_diagnostic.CA2214.severity = warning
dotnet_diagnostic.CA2215.severity = warning
dotnet_diagnostic.CA2216.severity = warning
dotnet_diagnostic.CA2217.severity = error
dotnet_diagnostic.CA2217.severity = error
dotnet_diagnostic.CA2218.severity = warning
dotnet_diagnostic.CA2219.severity = error
dotnet_diagnostic.CA2224.severity = none
Expand All @@ -791,7 +791,7 @@ dotnet_diagnostic.CA2235.severity = warning
dotnet_diagnostic.CA2237.severity = warning
dotnet_diagnostic.CA2241.severity = error
dotnet_diagnostic.CA2242.severity = error
dotnet_diagnostic.CA2243.severity = error
dotnet_diagnostic.CA2243.severity = error
dotnet_diagnostic.CA2244.severity = error
dotnet_diagnostic.CA2245.severity = error
dotnet_diagnostic.CA2246.severity = error
Expand All @@ -811,12 +811,12 @@ dotnet_diagnostic.CA2259.severity = warning
dotnet_diagnostic.CA2260.severity = warning
dotnet_diagnostic.CA2261.severity = warning

# Exceptions
# Microsoft.CodeAnalysis Exceptions
## CA1305: Specify IFormatProvider
[**ToStringLocalTests.cs]
dotnet_diagnostic.CA1305.severity = none
## CA1720: Identifiers should not contain type names
[**ObjectTo.cs]
dotnet_diagnostic.CA1720.severity = none

[**StringTo.cs]
dotnet_diagnostic.CA1720.severity = none

[**ToStringLocalTests.cs]
dotnet_diagnostic.CA1305.severity = none
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal void GivenToBooleanInvariantWhenInputIsNotValidThenFormatExceptionIsThr
object @this = "foo";

// Act
var action = () => @this.ToBooleanInvariant();
var action = @this.ToBooleanInvariant;

// Assert
action.Should().Throw<FormatException>();
Expand All @@ -36,7 +36,7 @@ internal void GivenToBooleanInvariantWhenInputIsNotValidThenInvalidCastException
object @this = new { Foo = "foo" };

// Act
var action = () => @this.ToBooleanInvariant();
var action = @this.ToBooleanInvariant;

// Assert
action.Should().Throw<InvalidCastException>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal void GivenToBooleanLocalWhenInputIsNotValidThenFormatExceptionIsThrown(
object @this = "foo";

// Act
var action = () => @this.ToBooleanLocal();
var action = @this.ToBooleanLocal;

// Assert
action.Should().Throw<FormatException>();
Expand All @@ -36,7 +36,7 @@ internal void GivenToBooleanLocalWhenInputIsNotValidThenInvalidCastExceptionIsTh
object @this = new { Foo = "foo" };

// Act
var action = () => @this.ToBooleanLocal();
var action = @this.ToBooleanLocal;

// Assert
action.Should().Throw<InvalidCastException>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal void GivenToByteInvariantWhenInputIsNotValidThenFormatExceptionIsThrown
object @this = "foo";

// Act
var action = () => @this.ToByteInvariant();
var action = @this.ToByteInvariant;

// Assert
action.Should().Throw<FormatException>();
Expand All @@ -36,7 +36,7 @@ internal void GivenToByteInvariantWhenInputIsNotValidThenInvalidCastExceptionIsT
object @this = new { Foo = "foo" };

// Act
var action = () => @this.ToByteInvariant();
var action = @this.ToByteInvariant;

// Assert
action.Should().Throw<InvalidCastException>();
Expand All @@ -49,7 +49,7 @@ internal void GivenToByteInvariantWhenInputIsNotValidThenOverflowExceptionIsThro
object @this = $"{byte.MaxValue}{byte.MaxValue}";

// Act
var action = () => @this.ToByteInvariant();
var action = @this.ToByteInvariant;

// Assert
action.Should().Throw<OverflowException>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal void GivenToByteLocalWhenInputIsNotValidThenFormatExceptionIsThrown()
object @this = "foo";

// Act
var action = () => @this.ToByteLocal();
var action = @this.ToByteLocal;

// Assert
action.Should().Throw<FormatException>();
Expand All @@ -36,7 +36,7 @@ internal void GivenToByteLocalWhenInputIsNotValidThenInvalidCastExceptionIsThrow
object @this = new { Foo = "foo" };

// Act
var action = () => @this.ToByteLocal();
var action = @this.ToByteLocal;

// Assert
action.Should().Throw<InvalidCastException>();
Expand All @@ -49,7 +49,7 @@ internal void GivenToByteLocalWhenInputIsNotValidThenOverflowExceptionIsThrown()
object @this = $"{byte.MaxValue}{byte.MaxValue}";

// Act
var action = () => @this.ToByteLocal();
var action = @this.ToByteLocal;

// Assert
action.Should().Throw<OverflowException>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal void GivenToCharInvariantWhenInputIsNotValidThenFormatExceptionIsThrown
object @this = "foo";

// Act
var action = () => @this.ToCharInvariant();
var action = @this.ToCharInvariant;

// Assert
action.Should().Throw<FormatException>();
Expand All @@ -36,7 +36,7 @@ internal void GivenToCharInvariantWhenInputIsNotValidThenArgumentNullExceptionIs
object @this = null!;

// Act
var action = () => @this.ToCharInvariant();
var action = @this.ToCharInvariant;

// Assert
action.Should().NotThrow<ArgumentNullException>();
Expand All @@ -49,7 +49,7 @@ internal void GivenToCharWhenInputIsNotValidThenInvalidCastExceptionIsThrown()
object @this = new { Foo = "foo" };

// Act
var action = () => @this.ToCharInvariant();
var action = @this.ToCharInvariant;

// Assert
action.Should().Throw<InvalidCastException>();
Expand All @@ -62,7 +62,7 @@ internal void GivenToCharInvariantWhenInputIsNotValidThenOverflowExceptionIsThro
object @this = -1;

// Act
var action = () => @this.ToCharInvariant();
var action = @this.ToCharInvariant;

// Assert
action.Should().Throw<OverflowException>();
Expand Down
Loading

0 comments on commit 7833e66

Please sign in to comment.