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
63 changes: 36 additions & 27 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
root = true

[*]
charset = utf-8
end_of_line = lf
Expand All @@ -7,24 +9,16 @@ indent_style = space
indent_size = 4 # A property with the same name was updated with a value 2 in a section [{*.yaml,*.yml}]

[{*.yaml,*.yml}]
indent_style = space
indent_size = 2 # A property with the same name was updated with a value 4 in a section [*]; with a value 4 in a section [*.{appxmanifest,asax,ascx,aspx,axaml,build,cg,cginc,compute,cs,cshtml,dtd,hlsl,hlsli,hlslinc,master,nuspec,paml,razor,resw,resx,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}]
dotnet_diagnostic.CA1047.severity = error

[*.{appxmanifest,asax,ascx,aspx,axaml,build,cg,cginc,compute,cs,cshtml,dtd,hlsl,hlsli,hlslinc,master,nuspec,paml,razor,resw,resx,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}]
indent_style = space
indent_size = 4 # A property with the same name was updated with a value 2 in a section [{*.yaml,*.yml}]
tab_width = 4
dotnet_style_operator_placement_when_wrapping = beginning_of_line

dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:error
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
Expand All @@ -35,13 +29,8 @@ dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_readonly_field = true:warning
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
dotnet_style_require_accessibility_modifiers = always:error
dotnet_style_allow_multiple_blank_lines_experimental = false:silent
dotnet_style_allow_statement_immediately_after_block_experimental = false:silent
dotnet_code_quality_unused_parameters = all:warning
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
Expand Down Expand Up @@ -77,6 +66,8 @@ dotnet_diagnostic.CA1852.severity = suggestion
dotnet_diagnostic.CA2012.severity = warning
dotnet_diagnostic.CA2019.severity = warning
dotnet_diagnostic.CA2211.severity = warning
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1725.severity = suggestion

[*.cs]

Expand Down Expand Up @@ -104,7 +95,8 @@ dotnet_style_parentheses_in_other_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning

# Modifier preferences
dotnet_style_require_accessibility_modifiers = always:error
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
dotnet_diagnostics.IDE0040.severity = warning

# Expression-level preferences
dotnet_style_coalesce_expression = true
Expand Down Expand Up @@ -712,14 +704,16 @@ resharper_blank_lines_inside_region = 1
resharper_blank_lines_inside_type = 0
resharper_blank_line_after_pi = true
resharper_braces_for_dowhile = required
resharper_braces_for_fixed = required
resharper_braces_for_fixed = required_for_multiline
resharper_braces_for_for = required_for_multiline
resharper_braces_for_foreach = required_for_multiline
resharper_braces_for_ifelse = required_for_multiline
resharper_braces_for_lock = required
resharper_braces_for_using = required
resharper_braces_for_lock = required_for_multiline
resharper_braces_for_using = required_for_multiline
resharper_braces_for_while = required_for_multiline
resharper_braces_redundant = true
resharper_builtin_type_apply_to_native_integer = true
resharper_csharp_empty_block_style = together_same_line
resharper_break_template_declaration = line_break
resharper_can_use_global_alias = false
resharper_configure_await_analysis_mode = disabled
Expand Down Expand Up @@ -817,7 +811,7 @@ resharper_indent_typearg_angles = inside
resharper_indent_typeparam_angles = inside
resharper_indent_type_constraints = true
resharper_indent_wrapped_function_names = false
resharper_instance_members_qualify_declared_in = base_class
resharper_instance_members_qualify_declared_in =
resharper_int_align_assignments = false
resharper_int_align_binary_expressions = false
resharper_int_align_declaration_names = false
Expand Down Expand Up @@ -918,7 +912,7 @@ resharper_place_simple_switch_expression_on_single_line = false
resharper_place_type_attribute_on_same_line = false
resharper_place_type_constraints_on_same_line = true
resharper_prefer_explicit_discard_declaration = false
resharper_prefer_separate_deconstructed_variables_declaration = true
resharper_prefer_separate_deconstructed_variables_declaration = false
resharper_preserve_spaces_inside_tags = pre,textarea
resharper_qualified_using_at_nested_scope = false
resharper_quote_style = doublequoted
Expand Down Expand Up @@ -1069,6 +1063,7 @@ resharper_space_within_typeof_parentheses = false
resharper_space_within_type_argument_angles = false
resharper_space_within_type_parameter_angles = false
resharper_space_within_type_parameter_parentheses = false
resharper_csharp_allow_alias = false
resharper_special_else_if_treatment = true
resharper_static_members_qualify_members = none
resharper_static_members_qualify_with = declared_type
Expand Down Expand Up @@ -1174,7 +1169,7 @@ resharper_arrange_default_value_when_type_evident_highlighting = suggestion
resharper_arrange_default_value_when_type_not_evident_highlighting = suggestion
resharper_arrange_local_function_body_highlighting = error
resharper_arrange_method_or_operator_body_highlighting = error
resharper_arrange_missing_parentheses_highlighting = hint
resharper_arrange_missing_parentheses_highlighting = none
resharper_arrange_namespace_body_highlighting = error
resharper_arrange_object_creation_when_type_evident_highlighting = suggestion
resharper_arrange_object_creation_when_type_not_evident_highlighting = suggestion
Expand Down Expand Up @@ -1289,7 +1284,7 @@ resharper_convert_to_using_declaration_highlighting = suggestion
resharper_convert_to_vb_auto_property_highlighting = suggestion
resharper_convert_to_vb_auto_property_when_possible_highlighting = hint
resharper_convert_to_vb_auto_property_with_private_setter_highlighting = hint
resharper_convert_type_check_pattern_to_null_check_highlighting = warning
resharper_convert_type_check_pattern_to_null_check_highlighting = none
resharper_convert_type_check_to_null_check_highlighting = warning
resharper_co_variant_array_conversion_highlighting = warning
resharper_c_declaration_with_implicit_int_type_highlighting = warning
Expand Down Expand Up @@ -1408,8 +1403,8 @@ resharper_meaningless_default_parameter_value_highlighting = warning
resharper_member_can_be_internal_highlighting = none
resharper_member_can_be_made_static_global_highlighting = hint
resharper_member_can_be_made_static_local_highlighting = hint
resharper_member_can_be_private_global_highlighting = suggestion
resharper_member_can_be_private_local_highlighting = suggestion
resharper_member_can_be_private_global_highlighting = hint
resharper_member_can_be_private_local_highlighting = hint
resharper_member_can_be_protected_global_highlighting = suggestion
resharper_member_can_be_protected_local_highlighting = suggestion
resharper_member_hides_interface_member_with_default_implementation_highlighting = warning
Expand Down Expand Up @@ -1537,7 +1532,7 @@ resharper_redundant_assignment_highlighting = warning
resharper_redundant_attribute_parentheses_highlighting = hint
resharper_redundant_attribute_usage_property_highlighting = suggestion
resharper_redundant_base_constructor_call_highlighting = warning
resharper_redundant_base_qualifier_highlighting = warning
resharper_redundant_base_qualifier_highlighting = none
resharper_redundant_blank_lines_highlighting = none
resharper_redundant_bool_compare_highlighting = warning
resharper_redundant_case_label_highlighting = warning
Expand All @@ -1547,7 +1542,7 @@ resharper_redundant_check_before_assignment_highlighting = warning
resharper_redundant_collection_initializer_element_braces_highlighting = hint
resharper_redundant_configure_await_highlighting = suggestion
resharper_redundant_declaration_semicolon_highlighting = hint
resharper_redundant_default_member_initializer_highlighting = warning
resharper_redundant_default_member_initializer_highlighting = hint
resharper_redundant_delegate_creation_highlighting = warning
resharper_redundant_disable_warning_comment_highlighting = warning
resharper_redundant_discard_designation_highlighting = suggestion
Expand Down Expand Up @@ -1872,4 +1867,18 @@ resharper_virtual_member_never_overridden_local_highlighting = suggestion
resharper_void_method_with_must_use_return_value_attribute_highlighting = warning
resharper_with_expression_instead_of_initializer_highlighting = suggestion
resharper_wrong_indent_size_highlighting = none
resharper_xunit_xunit_test_with_console_output_highlighting = warning
resharper_xunit_xunit_test_with_console_output_highlighting = warning
resharper_arrange_constructor_or_destructor_body_highlighting = hint
resharper_arrange_local_function_body_highlighting = hint
resharper_arrange_method_or_operator_body_highlighting = hint
resharper_arrange_null_checking_pattern_highlighting = suggestion
resharper_enforce_do_while_statement_braces_highlighting = warning
resharper_enforce_fixed_statement_braces_highlighting = warning
resharper_enforce_foreach_statement_braces_highlighting = none
resharper_enforce_for_statement_braces_highlighting = none
resharper_enforce_if_statement_braces_highlighting = none
resharper_enforce_lock_statement_braces_highlighting = warning
resharper_enforce_while_statement_braces_highlighting = none
resharper_remove_redundant_braces_highlighting = hint
resharper_suggest_discard_declaration_var_style_highlighting = warning
resharper_prefer_concrete_value_over_default_highlighting = hint
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
if: "github.event.pull_request.draft == false || github.event_name == 'push'"
permissions:
actions: read
contents: read
Expand All @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,12 +53,12 @@ jobs:
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '9.x'

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
windows_build:

runs-on: windows-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
if: "github.event.pull_request.draft == false || github.event_name == 'push'"

env:
DOTNET_NOLOGO: true
Expand All @@ -21,7 +21,9 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand All @@ -32,7 +34,7 @@ jobs:
linux_build:

runs-on: ubuntu-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
if: "github.event.pull_request.draft == false || github.event_name == 'push'"

env:
DOTNET_NOLOGO: true
Expand All @@ -43,7 +45,9 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand All @@ -54,7 +58,7 @@ jobs:
osx_build:

runs-on: macos-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
if: "github.event.pull_request.draft == false || github.event_name == 'push'"

env:
DOTNET_NOLOGO: true
Expand All @@ -65,7 +69,9 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
- name: "Setup .NET"
uses: "actions/setup-dotnet@v4"
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x

- name: Build
run: dotnet build -c Release
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
- name: "Setup .NET"
uses: "actions/setup-dotnet@v4"
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x

- name: Build
run: dotnet build -c Release
Expand Down Expand Up @@ -68,7 +70,9 @@ jobs:
- name: "Setup .NET"
uses: "actions/setup-dotnet@v4"
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x

- name: Build
run: dotnet build -c Release
Expand Down Expand Up @@ -116,7 +120,9 @@ jobs:
- name: "Setup .NET"
uses: "actions/setup-dotnet@v4"
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x

- name: Build
run: dotnet build -c Release
Expand Down Expand Up @@ -158,7 +164,9 @@ jobs:
- name: "Setup .NET"
uses: "actions/setup-dotnet@v2"
with:
dotnet-version: 8.x
dotnet-version: |
8.x
9.x

- name: Build
run: dotnet build -c Release
Expand Down
10 changes: 5 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<AnalysisLevel>latest</AnalysisLevel>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<VersionPrefix>1.1.12.0</VersionPrefix>
<AssemblyFileVersion>1.1.12.0</AssemblyFileVersion>
<VersionPrefix>1.2.0.0</VersionPrefix>
<AssemblyFileVersion>1.2.0.0</AssemblyFileVersion>
<Authors>Kotz</Authors>
<Copyright>Copyright © Kotz 2023</Copyright>
<PackageProjectUrl>https://github.com/Kaoticz/Json2Sharp</PackageProjectUrl>
Expand All @@ -22,11 +22,11 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Json2SharpApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal sealed class Program
/// </summary>
/// <param name="args">CLI arguments.</param>
/// <returns>Exit code.</returns>
private async static Task<int> Main(string[] args)
private static async Task<int> Main(string[] args)
{
var inputOption = new Option<FileInfo?>(["--input", "-i"], "The relative path to the JSON file in the file system.");
var outputOption = new Option<string?>(["--output", "-o"], "The relative path to the resulting file in the file system.");
Expand Down
Loading
Loading