diff --git a/.editorconfig b/.editorconfig index fa05938..0f27dd6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -273,6 +273,7 @@ dotnet_diagnostic.SA1122.severity = suggestion dotnet_diagnostic.SA1108.severity = silent dotnet_diagnostic.SA1012.severity = error dotnet_diagnostic.SA1500.severity = error +dotnet_diagnostic.SA1316.severity = error [*.{cs,vb}] dotnet_style_operator_placement_when_wrapping = beginning_of_line diff --git a/.github/workflows/dotnet-core-desktop.yml b/.github/workflows/dotnet-core-desktop.yml index ca82924..8202e20 100644 --- a/.github/workflows/dotnet-core-desktop.yml +++ b/.github/workflows/dotnet-core-desktop.yml @@ -29,13 +29,13 @@ jobs: # Install the .NET Core workload - name: Install .NET Core - uses: actions/setup-dotnet@v3.0.3 + uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.1.3 + uses: microsoft/setup-msbuild@v1.3.1 # Restore the application to populate the obj folder with RuntimeIdentifiers - name: Restore the application diff --git a/Analogy.LogViewer.NLog.Targets.UnitTests/Analogy.LogViewer.NLog.Targets.UnitTests.csproj b/Analogy.LogViewer.NLog.Targets.UnitTests/Analogy.LogViewer.NLog.Targets.UnitTests.csproj index db8ccce..03d03a4 100644 --- a/Analogy.LogViewer.NLog.Targets.UnitTests/Analogy.LogViewer.NLog.Targets.UnitTests.csproj +++ b/Analogy.LogViewer.NLog.Targets.UnitTests/Analogy.LogViewer.NLog.Targets.UnitTests.csproj @@ -1,7 +1,7 @@ - net7.0-windows + net8.0-windows false diff --git a/Analogy.LogViewer.NLog.Targets.UnitTests/UnitTest1.cs b/Analogy.LogViewer.NLog.Targets.UnitTests/UnitTest1.cs index 76c81c2..6f8b4b9 100644 --- a/Analogy.LogViewer.NLog.Targets.UnitTests/UnitTest1.cs +++ b/Analogy.LogViewer.NLog.Targets.UnitTests/UnitTest1.cs @@ -10,4 +10,4 @@ // { // } // } -//} +//} \ No newline at end of file diff --git a/Analogy.LogViewer.NLog.Targets.sln b/Analogy.LogViewer.NLog.Targets.sln index 4fb707c..6bbe4ee 100644 --- a/Analogy.LogViewer.NLog.Targets.sln +++ b/Analogy.LogViewer.NLog.Targets.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30404.54 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34309.116 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Analogy.LogViewer.NLog.Targets", "Analogy.LogViewer.NLog.Targets\Analogy.LogViewer.NLog.Targets.csproj", "{68AE619D-E4FF-4FE2-866A-A85B0369097B}" EndProject @@ -10,6 +10,10 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2AD56165-40DC-4358-A1E4-7405DFA3A32C}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + BannedSymbols.txt = BannedSymbols.txt + Directory.Build.props = Directory.Build.props + .github\workflows\dotnet-core-desktop.yml = .github\workflows\dotnet-core-desktop.yml + nuget.config = nuget.config EndProjectSection EndProject Global diff --git a/Analogy.LogViewer.NLog.Targets/Analogy.LogViewer.NLog.Targets.csproj b/Analogy.LogViewer.NLog.Targets/Analogy.LogViewer.NLog.Targets.csproj index a528d57..3bbf928 100644 --- a/Analogy.LogViewer.NLog.Targets/Analogy.LogViewer.NLog.Targets.csproj +++ b/Analogy.LogViewer.NLog.Targets/Analogy.LogViewer.NLog.Targets.csproj @@ -1,30 +1,19 @@ - net7.0-windows;net6.0-windows;net48;net471 - true - Lior Banai © 2020-2023 + net8.0-windows;net7.0-windows;net6.0-windows;net48;net471 + Lior Banai © 2020-2024 Analogy.LogViewer - true - true - true - snupkg - true - true https://github.com/Analogy-LogViewer/Analogy.LogViewer.NLog.Targets - git https://github.com/Analogy-LogViewer/Analogy.LogViewer.NLog.Targets - MIT AnalogyNlog.png - 5.0.3.2 + 6.0.0.0 - enable - latest - - + + all diff --git a/Analogy.LogViewer.NLog.Targets/Constants.cs b/Analogy.LogViewer.NLog.Targets/Constants.cs index b878f13..c357c1a 100644 --- a/Analogy.LogViewer.NLog.Targets/Constants.cs +++ b/Analogy.LogViewer.NLog.Targets/Constants.cs @@ -10,4 +10,4 @@ public static class Constants public static readonly string Source = "Source"; public static readonly string ThreadId = "ThreadId"; } -} +} \ No newline at end of file diff --git a/Analogy.LogViewer.NLog.Targets/NLogToAnalogyGRPCTarget.cs b/Analogy.LogViewer.NLog.Targets/NLogToAnalogyGRPCTarget.cs index 4e6870b..bd9af79 100644 --- a/Analogy.LogViewer.NLog.Targets/NLogToAnalogyGRPCTarget.cs +++ b/Analogy.LogViewer.NLog.Targets/NLogToAnalogyGRPCTarget.cs @@ -1,11 +1,11 @@ -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Analogy.Interfaces; +using Analogy.Interfaces; using NLog; using NLog.Config; using NLog.Layouts; using NLog.Targets; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; namespace Analogy.LogViewer.NLog.Targets { @@ -147,4 +147,4 @@ private static AnalogyLogLevel ConvertLogLevel(LogLevel logLevel) return AnalogyLogLevel.Unknown; } } -} +} \ No newline at end of file diff --git a/BannedSymbols.txt b/BannedSymbols.txt new file mode 100644 index 0000000..26002bb --- /dev/null +++ b/BannedSymbols.txt @@ -0,0 +1,9 @@ +#https://github.com/dotnet/csharplang/blob/main/spec/documentation-comments.md#id-string-format + +M:System.String.ToLower;Use ToLowerInvariant instead +M:System.String.ToUpper;Use ToUpperInvariant instead + +F:System.StringComparison.CurrentCulture;Consider using Ordinal +F:System.StringComparison.CurrentCultureIgnoreCase;Consider using OrdinalIgnoreCase +F:System.StringComparison.InvariantCurrent;Consider using Ordinal +F:System.StringComparison.InvariantCurrentIgnoreCase;Consider using OrdinalIgnoreCase diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..cee7053 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,64 @@ + + + true + true + True + snupkg + true + true + true + MIT + true + False + git + portable + + + enable + latest + + + $(DefineContants);DEBUG + false + + + true + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + \ No newline at end of file