Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port to .NET 8 #11

Merged
merged 1 commit into from
Dec 13, 2023
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
38 changes: 33 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
dotnet_diagnostic.CS1591.severity = none

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj}]
Expand Down Expand Up @@ -66,7 +67,7 @@ dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
# Constants are PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
dotnet_naming_rule.constants_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.constants.applicable_kinds = field, local
dotnet_naming_symbols.constants.required_modifiers = const
Expand All @@ -76,7 +77,7 @@ dotnet_naming_style.constant_style.capitalization = pascal_case
# Static fields are camelCase
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
dotnet_naming_rule.static_fields_should_be_camel_case.style = camel_case_style

dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
Expand All @@ -86,7 +87,7 @@ dotnet_naming_style.static_field_style.capitalization = camel_case
# Instance fields are camelCase
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_rule.instance_fields_should_be_camel_case.style = camel_case_style

dotnet_naming_symbols.instance_fields.applicable_kinds = field

Expand All @@ -104,7 +105,7 @@ dotnet_naming_style.camel_case_style.capitalization = camel_case
# Local functions are PascalCase
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
dotnet_naming_rule.local_functions_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.local_functions.applicable_kinds = local_function

Expand All @@ -113,11 +114,26 @@ dotnet_naming_style.local_function_style.capitalization = pascal_case
# By default, name items with PascalCase
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
dotnet_naming_rule.members_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.all_members.applicable_kinds = *

dotnet_naming_style.pascal_case_style.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
end_of_line = crlf
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_collection_expression = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_diagnostic.CA1001.severity = warning

# CSharp code style settings:
[*.cs]
Expand Down Expand Up @@ -166,6 +182,18 @@ dotnet_diagnostic.SA1130.severity = silent

# IDE1006: Naming Styles - StyleCop handles these for us
dotnet_diagnostic.IDE1006.severity = none
csharp_using_directive_placement = inside_namespace:warning
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_namespace_declarations = file_scoped:warning
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = false:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion

[*.sln]
indent_style = tab
30 changes: 0 additions & 30 deletions .github/workflows/dotnet-core.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/ofxnet-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: OFX.NET PR

on:
pull_request:
branches: [ "main" ]

env:
TreatWarningsAsErrors: true

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build
9 changes: 5 additions & 4 deletions BankingTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet", "OfxNet\OfxNet.csproj", "{FB4B0B05-D087-464A-B03C-7B512AE0735D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet", "src\OfxNet\OfxNet.csproj", "{FB4B0B05-D087-464A-B03C-7B512AE0735D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.UnitTests", "OfxNet.UnitTests\OfxNet.UnitTests.csproj", "{4DBA4695-02D6-49C2-810A-DE8DFE7B70EB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.UnitTests", "test\OfxNet.UnitTests\OfxNet.UnitTests.csproj", "{4DBA4695-02D6-49C2-810A-DE8DFE7B70EB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.IntegrationTests", "OfxNet.IntegrationTests\OfxNet.IntegrationTests.csproj", "{1A1F0950-9156-44A0-BFE8-4E5B001F9A84}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.IntegrationTests", "test\OfxNet.IntegrationTests\OfxNet.IntegrationTests.csproj", "{1A1F0950-9156-44A0-BFE8-4E5B001F9A84}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9820D1F4-882C-4CF1-8E02-71939CE4B3A7}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
Directory.Build.props = Directory.Build.props
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
LICENSE = LICENSE
.github\workflows\ofxnet-pr.yml = .github\workflows\ofxnet-pr.yml
README.md = README.md
EndProjectSection
EndProject
Expand Down
15 changes: 14 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<Project>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.1.0</FileVersion>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<PlatformTarget>x64</PlatformTarget>
<NeutralLanguage>en-GB</NeutralLanguage>
<Authors>Jim Dale</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
</Project>
</Project>
95 changes: 0 additions & 95 deletions OfxNet.IntegrationTests/OfxDocumentTests.cs

This file was deleted.

49 changes: 0 additions & 49 deletions OfxNet.IntegrationTests/OfxNet.IntegrationTests.csproj

This file was deleted.

22 changes: 0 additions & 22 deletions OfxNet.UnitTests/OfxNet.UnitTests.csproj

This file was deleted.

Loading