Skip to content
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
42 changes: 28 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
dotnet_naming_symbols.constant_fields.required_modifiers = const
tab_width=4
tab_width= 4
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_namespace_match_folder = true:suggestion
###############################
# C# Coding Conventions #
###############################
Expand All @@ -82,12 +84,12 @@ csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = true:silent
# Expression-bodied members
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
# Pattern matching preferences
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
Expand Down Expand Up @@ -132,9 +134,21 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
###############################
# VB Coding Conventions #
###############################
[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_switch_expression = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_extended_property_pattern = true:suggestion
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_namespace_declarations = file_scoped:suggestion
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_prefer_system_threading_lock = true:suggestion
csharp_style_prefer_simple_property_accessors = true:suggestion
csharp_prefer_static_local_function = true:suggestion
csharp_prefer_static_anonymous_function = true:suggestion
csharp_style_prefer_readonly_struct = true:suggestion
csharp_style_prefer_readonly_struct_member = true:suggestion
csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion
12 changes: 3 additions & 9 deletions Aigamo.ResXGenerator.Tests/AdditionalTextStub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@

namespace Aigamo.ResXGenerator.Tests;

internal class AdditionalTextStub : AdditionalText
internal class AdditionalTextStub(string path, string? text = null) : AdditionalText
{
private readonly SourceText? _text;
private readonly SourceText? _text = text is null ? null : SourceText.From(text);

public override string Path { get; }

public AdditionalTextStub(string path, string? text = null)
{
_text = text is null ? null : SourceText.From(text);
Path = path;
}
public override string Path { get; } = path;

public override SourceText? GetText(CancellationToken cancellationToken = new()) => _text;
}
11 changes: 9 additions & 2 deletions Aigamo.ResXGenerator.Tests/Aigamo.ResXGenerator.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -8,7 +8,7 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<Import Project="../Aigamo.ResXGenerator/build/Aigamo.ResXGenerator.props"/>
<Import Project="../Aigamo.ResXGenerator/build/Aigamo.ResXGenerator.props" />

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
Expand All @@ -17,6 +17,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand All @@ -35,9 +36,15 @@
<EmbeddedResource Update="IntegrationTests\Test2.resx">
<GenerateCode>true</GenerateCode>
</EmbeddedResource>
<EmbeddedResource Update="IntegrationTests\Test2a.resx">
<GenerationType>CodeGeneration</GenerationType>
</EmbeddedResource>
<EmbeddedResource Update="IntegrationTests\Test3.resx">
<SkipFile>true</SkipFile>
</EmbeddedResource>
<EmbeddedResource Update="IntegrationTests\Test4.resx">
<GenerationType>StringLocalizer</GenerationType>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
Expand Down
Loading