From f9769810bef3dcf8741404400fda6a2daff4c7eb Mon Sep 17 00:00:00 2001 From: Maximilian Haru Raditya Date: Thu, 11 Jan 2024 11:17:56 +0700 Subject: [PATCH] Updated configuration. --- .editorconfig | 55 ++++--- .gitattributes | 6 +- .github/workflows/build.yml | 3 - CHANGELOG.md | 2 +- Directory.Build.props | 17 ++ Directory.Packages.props | 1 - LICENSE | 3 - build/AssemblyInfo.Global.cs | 2 +- build/Build.props | 154 +++++++++++------- src/Directory.Build.props | 8 +- src/Directory.Build.targets | 7 + ...rnate.ObservableCollections.DemoApp.csproj | 4 - ...rnate.ObservableCollections.Helpers.csproj | 2 - ...bernate.ObservableCollections.Tests.csproj | 4 - .../NHibernate.ObservableCollections.csproj | 2 - 15 files changed, 159 insertions(+), 111 deletions(-) diff --git a/.editorconfig b/.editorconfig index a87fd69..73f8887 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,75 +1,71 @@ # EditorConfig is awesome: https://EditorConfig.org -# top-most EditorConfig file -root = true +#### Core EditorConfig Options #### # Code-style rule options # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options?view=vs-2022 # https://github.com/dotnet/roslyn/blob/main/src/VisualStudio/Core/Def/CodeCleanup/readme.md +# top-most EditorConfig file +root = true + + # All files [*] + +# File encoding preferences charset = utf-8 + +# New line preferences end_of_line = crlf insert_final_newline = true trim_trailing_whitespace = true + +# Indentation and spacing indent_style = space indent_size = 4 tab_width = 4 # Project files -[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +[*.{csproj,vbproj,vcxproj,vcxproj.filters,fsproj,sqlproj,dbproj,wixproj,shproj,proj}] indent_size = 2 tab_width = 2 # Solution and project configuration files -[*.{props,targets,manifest,yml,ruleset,nuspec,vsixmanifest,vsct}] +[*.{manifest,props,targets,yml,yaml}] indent_size = 2 tab_width = 2 -# XML configuration files -[*.{xml,xsd,json,config,resx}] +# JSON and XML configuration files +[*.{json,config,ruleset,resx,xml,xsd}] indent_size = 2 tab_width = 2 -# HTML, CSS, SCSS files -[*.{html,css,scss}] +# HTML, CSS, and related files +[*.{html,css,scss,less}] indent_size = 2 +tab_width = 2 # Markdown files [*.md] -trim_trailing_whitespace = false - - -# Code files -[*.{cs,csx,vb,vbx}] - +indent_size = 2 +tab_width = 2 -#### Core EditorConfig Options #### -# File encoding preferences -charset = utf-8 - -# New line preferences -end_of_line = crlf -insert_final_newline = true -trim_trailing_whitespace = true +#### .NET Coding Conventions #### -# Indentation and spacing -indent_style = space +# C# and VB.NET files +[*.{cs,csx,cshtml,vb,vbx,vbhtml,xaml}] indent_size = 4 tab_width = 4 - -#### .NET Coding Conventions #### - # Organize usings dotnet_separate_import_directive_groups = true dotnet_sort_system_directives_first = true @@ -192,6 +188,9 @@ dotnet_diagnostic.CA1311.severity = warning # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1815 dotnet_diagnostic.CA1815.severity = error +# NUnit2045: Use Assert.Multiple +dotnet_diagnostic.NUnit2045.severity = silent + # C# files [*.cs] @@ -251,6 +250,8 @@ csharp_style_unused_value_assignment_preference = discard_variable:suggestion csharp_style_unused_value_expression_statement_preference = discard_variable:silent # 'using' directive preferences +# SA1200: UsingDirectivesMustBePlacedWithinNamespace +# https://documentation.help/StyleCop/SA1200.html csharp_using_directive_placement = inside_namespace:silent # New line preferences diff --git a/.gitattributes b/.gitattributes index 8a0bad5..429b0e7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -40,6 +40,7 @@ MAKEFILE text *.sql text *.sqlgen text eol=crlf *.wixproj text eol=crlf merge=union +*.shproj text eol=crlf merge=union *.proj text eol=crlf merge=union *.xml text diff=html *.xsd text diff=html @@ -56,6 +57,8 @@ MAKEFILE text *.ps1xml text eol=crlf *.cmd text eol=crlf *.bat text eol=crlf +*.yml text +*.yaml text *.licenseheader text eol=crlf *.pubxml text eol=crlf *.md text diff=markdown @@ -65,16 +68,15 @@ MAKEFILE text *.exe binary *.dll binary *.pdb binary -*.msi binary *.xap binary *.snk binary *.png binary -*.ico binary *.jpg binary *.jpeg binary *.gif binary *.bmp binary *.webp binary +*.ico binary *.cur binary *.sys binary *.chm binary diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0087d0c..811bfed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,6 +84,3 @@ jobs: with: name: '${{env.test_results_artifact_name}}' path: '${{github.workspace}}/${{env.test_results_artifact_name}}' - - - diff --git a/CHANGELOG.md b/CHANGELOG.md index fe881c4..1ace72d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # NHibernate.ObservableCollections - Changelog -## 5.0.0 (2023-04-06) +## 5.0.0 (2024-01-11) Initial release. diff --git a/Directory.Build.props b/Directory.Build.props index 61213bd..9ad2390 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,24 @@ + + + + true + + + true + diff --git a/Directory.Packages.props b/Directory.Packages.props index 9bcb6fb..3dc63d4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -29,6 +29,5 @@ - diff --git a/LICENSE b/LICENSE index e907581..a432283 100644 --- a/LICENSE +++ b/LICENSE @@ -19,6 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - diff --git a/build/AssemblyInfo.Global.cs b/build/AssemblyInfo.Global.cs index f867fa1..fea0816 100644 --- a/build/AssemblyInfo.Global.cs +++ b/build/AssemblyInfo.Global.cs @@ -1,4 +1,4 @@ using System.Runtime.InteropServices; [assembly: CLSCompliant(true)] -[assembly: ComVisible(false)] +[assembly: ComVisible(true)] diff --git a/build/Build.props b/build/Build.props index 713b793..a5a9893 100644 --- a/build/Build.props +++ b/build/Build.props @@ -1,6 +1,10 @@ + @@ -10,13 +14,10 @@ net8.0-windows - net8.0-windows;net48 - net8.0; net8.0;net7.0;net6.0;net48 net8.0;net7.0;net6.0;net48 - true latest enable @@ -24,75 +25,75 @@ - - false - build - bin - obj - $(SolutionDir)$(OutputFolder)\ - $(OutputBaseFolderPath) - $(OutputBaseFolderPath)$(Configuration)\$(TargetFramework)\$(MSBuildProjectName)\ - $(OutputPath) - - + + false + + build + bin + obj + + $(SolutionDir)$(BuildConfigurationFolder)\ + + $(SolutionDir)$(OutputFolder)\ + $(OutputBaseFolderPath) + $(OutputBaseFolderPath)$(Configuration)\$(TargetFramework)\$(MSBuildProjectName)\ + $(OutputPath) + $(SolutionDir)$(TemporaryOutputFolder)\ $(IntermediateOutputBaseFolderPath)\$(MSBuildProjectName)\ - $(IntermediateOutputBaseFolderPath)\$(MSBuildProjectName)\$(Configuration)\ + + + + $(OutputBaseFolderPath)$(Configuration)\ + false $(WarningsAsErrors) $(NoWarn);CS1591 - $(NoWarn);CS0612;CS0618 - + 0.0.0 $(APPVEYOR_BUILD_VERSION) $(BuildVersion.Split('.')[0]) $(BuildVersion.Split('-')[0]) - $(SolutionDir)$(BuildConfigurationFolder)\NHibernate.ObservableCollections.snk + $(BuildConfigurationFolderPath)NHibernate.ObservableCollections.snk true true @@ -157,7 +179,6 @@ $(BuildVersionMajor).0.0 $(BuildVersionNoSuffix) - $(OutputBaseFolderPath)$(Configuration)\ MIT false https://github.com/mahara/NHibernate.ObservableCollections @@ -195,6 +216,15 @@ https://andrewlock.net/using-reference-assemblies-to-build-net-framework-libararies-on-linux-without-mono/ --> + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + @@ -207,10 +237,14 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 78f715e..12f133a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,12 @@ - + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 71fffef..693f25e 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -2,4 +2,11 @@ + + + diff --git a/src/NHibernate.ObservableCollections.DemoApp/NHibernate.ObservableCollections.DemoApp.csproj b/src/NHibernate.ObservableCollections.DemoApp/NHibernate.ObservableCollections.DemoApp.csproj index c4a3dfe..176b0cb 100644 --- a/src/NHibernate.ObservableCollections.DemoApp/NHibernate.ObservableCollections.DemoApp.csproj +++ b/src/NHibernate.ObservableCollections.DemoApp/NHibernate.ObservableCollections.DemoApp.csproj @@ -26,10 +26,6 @@ - - - - diff --git a/src/NHibernate.ObservableCollections.Helpers/NHibernate.ObservableCollections.Helpers.csproj b/src/NHibernate.ObservableCollections.Helpers/NHibernate.ObservableCollections.Helpers.csproj index 41f1630..ef36fed 100644 --- a/src/NHibernate.ObservableCollections.Helpers/NHibernate.ObservableCollections.Helpers.csproj +++ b/src/NHibernate.ObservableCollections.Helpers/NHibernate.ObservableCollections.Helpers.csproj @@ -21,8 +21,6 @@ - - diff --git a/src/NHibernate.ObservableCollections.Tests/NHibernate.ObservableCollections.Tests.csproj b/src/NHibernate.ObservableCollections.Tests/NHibernate.ObservableCollections.Tests.csproj index 78232c6..17428fa 100644 --- a/src/NHibernate.ObservableCollections.Tests/NHibernate.ObservableCollections.Tests.csproj +++ b/src/NHibernate.ObservableCollections.Tests/NHibernate.ObservableCollections.Tests.csproj @@ -25,11 +25,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - all @@ -39,7 +36,6 @@ - diff --git a/src/NHibernate.ObservableCollections/NHibernate.ObservableCollections.csproj b/src/NHibernate.ObservableCollections/NHibernate.ObservableCollections.csproj index 1bb4c69..26abc26 100644 --- a/src/NHibernate.ObservableCollections/NHibernate.ObservableCollections.csproj +++ b/src/NHibernate.ObservableCollections/NHibernate.ObservableCollections.csproj @@ -19,8 +19,6 @@ - -