Skip to content

Commit

Permalink
Updated configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
mahara committed Dec 8, 2023
1 parent a181bfd commit 3ce890f
Show file tree
Hide file tree
Showing 20 changed files with 270 additions and 161 deletions.
165 changes: 88 additions & 77 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tab_width = 2


# Solution and project configuration files
[*.{props,targets,yml,ruleset,nuspec,vsixmanifest,vsct}]
[*.{props,targets,manifest,yml,ruleset,nuspec,vsixmanifest,vsct}]
indent_size = 2
tab_width = 2

Expand Down Expand Up @@ -76,56 +76,57 @@ dotnet_sort_system_directives_first = true
file_header_template = unset

# this. and Me. preferences
dotnet_style_qualification_for_event = false
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_property = false
dotnet_style_qualification_for_event = false:silent
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_property = false:silent

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent

# Expression-level preferences
dotnet_style_coalesce_expression = true
dotnet_style_collection_initializer = true
dotnet_style_explicit_tuple_names = true
dotnet_style_namespace_match_folder = true
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_diagnostic.IDE0130.severity = suggestion
dotnet_style_null_propagation = true
dotnet_style_object_initializer = true
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_operator_placement_when_wrapping = end_of_line
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_compound_assignment = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_collection_expression = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_style_prefer_simplified_boolean_expressions = true
dotnet_style_prefer_simplified_interpolation = true
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion

# Field preferences
dotnet_style_readonly_field = true
dotnet_style_readonly_field = true:suggestion

# Parameter preferences
dotnet_code_quality_unused_parameters = all
dotnet_code_quality_unused_parameters = all:suggestion

# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none

# New line preferences
dotnet_style_allow_multiple_blank_lines_experimental = true
dotnet_style_allow_statement_immediately_after_block_experimental = false
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_style_allow_statement_immediately_after_block_experimental = false:silent


#### Naming styles ####
Expand Down Expand Up @@ -177,11 +178,19 @@ dotnet_naming_style.begins_with_i.capitalization = pascal_case

# CA1307: Specify StringComparison for clarity
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1307
dotnet_diagnostic.CA1307.severity = suggestion
dotnet_diagnostic.CA1307.severity = warning

# CA1309: Use ordinal StringComparison
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1309
dotnet_diagnostic.CA1309.severity = suggestion
dotnet_diagnostic.CA1309.severity = warning

# CA1311: Specify a culture or use an invariant version
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1311
dotnet_diagnostic.CA1311.severity = warning

# CA1815: Override equals and operator equals on value types
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1815
dotnet_diagnostic.CA1815.severity = error


# C# files
Expand All @@ -190,64 +199,64 @@ dotnet_diagnostic.CA1309.severity = suggestion
#### C# Coding Conventions ####

# var preferences
csharp_style_var_elsewhere = true
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = true:silent
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent

# Expression-bodied members
csharp_style_expression_bodied_accessors = true
csharp_style_expression_bodied_constructors = false
csharp_style_expression_bodied_indexers = true
csharp_style_expression_bodied_lambdas = true
csharp_style_expression_bodied_local_functions = false
csharp_style_expression_bodied_methods = false
csharp_style_expression_bodied_operators = false
csharp_style_expression_bodied_properties = true
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true
csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_prefer_extended_property_pattern = true
csharp_style_prefer_not_pattern = true
csharp_style_prefer_pattern_matching = true
csharp_style_prefer_switch_expression = true
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_extended_property_pattern = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_switch_expression = true:suggestion

# Null-checking preferences
csharp_style_conditional_delegate_call = true
csharp_style_conditional_delegate_call = true:suggestion

# Modifier preferences
csharp_prefer_static_local_function = true
csharp_prefer_static_local_function = true:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async

# Code-block preferences
csharp_prefer_braces = true
csharp_prefer_simple_using_statement = true
csharp_style_namespace_declarations = block_scoped
csharp_style_prefer_method_group_conversion = true
csharp_style_prefer_top_level_statements = true
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_namespace_declarations = file_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent

# Expression-level preferences
csharp_prefer_simple_default_expression = true
csharp_style_deconstructed_variable_declaration = true
csharp_style_implicit_object_creation_when_type_is_apparent = true
csharp_style_inlined_variable_declaration = true
csharp_style_prefer_index_operator = true
csharp_style_prefer_local_over_anonymous_function = true
csharp_style_prefer_null_check_over_type_check = true
csharp_style_prefer_range_operator = true
csharp_style_prefer_tuple_swap = true
csharp_style_prefer_utf8_string_literals = true
csharp_style_throw_expression = true
csharp_style_unused_value_assignment_preference = discard_variable
csharp_style_unused_value_expression_statement_preference = discard_variable
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent

# 'using' directive preferences
csharp_using_directive_placement = inside_namespace
csharp_using_directive_placement = inside_namespace:silent

# New line preferences
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
csharp_style_allow_embedded_statements_on_same_line_experimental = false
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:silent
csharp_style_allow_embedded_statements_on_same_line_experimental = false:silent


#### C# Formatting Rules ####
Expand Down Expand Up @@ -296,6 +305,11 @@ csharp_space_between_square_brackets = false
# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
csharp_style_prefer_primary_constructors = false:suggestion
csharp_style_prefer_readonly_struct_member = true:suggestion
csharp_style_prefer_readonly_struct = true:suggestion
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent


# C# generated files
Expand All @@ -307,6 +321,3 @@ generated_code = true
[*.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



3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,3 @@ MAKEFILE text eol=crlf
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain



10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]
project:
- 'Castle.Facilities.NHibernateIntegration.sln'
framework: [net7.0, net6.0, net48]
framework: [net8.0, net7.0, net6.0, net48]
configuration: [Release]
exclude:
- os: ubuntu-latest
Expand All @@ -29,13 +29,19 @@ jobs:

env:
trx_file_name: 'TestResults.trx'
md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown
md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdownx

steps:

- name: Checkout Source Code
uses: actions/checkout@v3

- name: Setup .NET 8.0 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
if: ${{ startswith(matrix.framework, 'net8.') }}

- name: Setup .NET 7.0 SDK
uses: actions/setup-dotnet@v3
with:
Expand Down
14 changes: 3 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
## https://github.com/github/gitignore

src/*/bin/
src/*/obj/
lib/packages/
packages/
.vs/
.idea/
build/
bin/
log/
obj/
temp/
.vs/
.idea/
log/

*.suo
*.user
Expand All @@ -19,6 +14,3 @@ temp/
*.log
*.cache
Thumbs.db



6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Castle.Facilities.NHibernateIntegration - Changelog

## 5.4.0 (2023-xx-xx)
## 5.4.0 (2024-xx-xx)

Improvements:
- Added .NET 7.0 support
- Added .NET 8.0 and .NET 7.0 support
- Updated [System.Data.SqlClient] version to 4.8.5
- Updated [NHibernate] version to 5.4.6
- Updated [NHibernate] version to 5.4.7

Breaking Changes:
- Upgraded [Castle.Core] version to 5.1.1 (TBD)
Expand Down
36 changes: 28 additions & 8 deletions Castle.Facilities.NHibernateIntegration.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,48 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Castle Build", "Castle Build", "{31144CF9-AFCB-4A8C-80A7-3A834D6AAFE2}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Castle", "Castle", "{31144CF9-AFCB-4A8C-80A7-3A834D6AAFE2}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
CHANGELOG.md = CHANGELOG.md
CONTRIBUTING.md = CONTRIBUTING.md
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{34CB1007-C1A1-4CCE-A4C9-56FCFE3988DD}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
build.cmd = build.cmd
buildscripts\build.cmd = buildscripts\build.cmd
build.sh = build.sh
BuildPackages.cmd = BuildPackages.cmd
buildscripts\BuildPackages.cmd = buildscripts\BuildPackages.cmd
CHANGELOG.md = CHANGELOG.md
CleanPackages.cmd = CleanPackages.cmd
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "buildscripts", "buildscripts", "{D7F0D6E6-A41E-4F41-B7FD-65B07D5BA6E0}"
ProjectSection(SolutionItems) = preProject
buildscripts\build.cmd = buildscripts\build.cmd
buildscripts\BuildPackages.cmd = buildscripts\BuildPackages.cmd
buildscripts\common.props = buildscripts\common.props
buildscripts\CommonAssemblyInfo.cs = buildscripts\CommonAssemblyInfo.cs
CONTRIBUTING.md = CONTRIBUTING.md
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub Actions", "GitHub Actions", "{47F2F74D-7773-450C-B6E7-2D3B7C8814A8}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CD342E79-A425-4922-8CFE-4B990EACF71E}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
src\Directory.Build.targets = src\Directory.Build.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Castle.Facilities.NHibernateIntegration", "src\Castle.Facilities.NHibernateIntegration\Castle.Facilities.NHibernateIntegration.csproj", "{5E3FDB17-A6C1-4FA2-8834-17AA672746D5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Castle.Facilities.NHibernateIntegration.Tests", "src\Castle.Facilities.NHibernateIntegration.Tests\Castle.Facilities.NHibernateIntegration.Tests.csproj", "{1D68E0C9-FFC1-4271-8194-1AD17C318433}"
Expand All @@ -50,7 +67,10 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{47F2F74D-7773-450C-B6E7-2D3B7C8814A8} = {31144CF9-AFCB-4A8C-80A7-3A834D6AAFE2}
{47F2F74D-7773-450C-B6E7-2D3B7C8814A8} = {34CB1007-C1A1-4CCE-A4C9-56FCFE3988DD}
{34CB1007-C1A1-4CCE-A4C9-56FCFE3988DD} = {31144CF9-AFCB-4A8C-80A7-3A834D6AAFE2}
{D7F0D6E6-A41E-4F41-B7FD-65B07D5BA6E0} = {34CB1007-C1A1-4CCE-A4C9-56FCFE3988DD}
{CD342E79-A425-4922-8CFE-4B990EACF71E} = {34CB1007-C1A1-4CCE-A4C9-56FCFE3988DD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A4EC0140-6DD7-4D6D-8F91-38F891D8DC44}
Expand Down
Loading

0 comments on commit 3ce890f

Please sign in to comment.