diff --git a/.build.Nuke/Build.GitLab.cs b/.build.Nuke/Build.GitLab.cs
index be8bec9679e144d07a11010b8800055b91a068ab..aa3ac4dd415bf83fe5ba4d65a73832a5ecda5137 100644
--- a/.build.Nuke/Build.GitLab.cs
+++ b/.build.Nuke/Build.GitLab.cs
@@ -83,7 +83,7 @@ sealed partial class Build : NukeBuild
packageLink,
new StreamContent(fileStream)).ConfigureAwait(false);
- _ = response.EnsureSuccessStatusCode();
+ _ = response.EnsureSuccessStatusCode();
}
catch (Exception ex)
{
@@ -116,7 +116,7 @@ sealed partial class Build : NukeBuild
description = $"Created {Date}"
}).ConfigureAwait(false);
- _ = response.EnsureSuccessStatusCode();
+ _ = response.EnsureSuccessStatusCode();
}
catch (Exception ex)
{
@@ -148,7 +148,7 @@ sealed partial class Build : NukeBuild
message = $"Automatic tag creation: {isScheduled} at {Date}"
}).ConfigureAwait(false);
- _ = response.EnsureSuccessStatusCode();
+ _ = response.EnsureSuccessStatusCode();
}
catch (Exception ex)
{
@@ -229,7 +229,7 @@ sealed partial class Build : NukeBuild
url = itemLink
}).ConfigureAwait(false);
- _ = response.EnsureSuccessStatusCode();
+ _ = response.EnsureSuccessStatusCode();
}
catch (Exception ex)
{
diff --git a/.build.Nuke/Build.Test.cs b/.build.Nuke/Build.Test.cs
index 76ec9e937a11896cc5d0fd669c84a637cf718a69..42e83d0ea781558f546980cca963d757d17494c4 100644
--- a/.build.Nuke/Build.Test.cs
+++ b/.build.Nuke/Build.Test.cs
@@ -30,26 +30,26 @@ sealed partial class Build : NukeBuild
.DependsOn(Compile)
.Executes(() =>
{
- _ = coverageResultDirectory.CreateDirectory();
- _ = Coverlet(s => s
- .SetTarget("dotnet")
- .SetTargetArgs("test --no-build --no-restore")
- .SetAssembly(testAssembly)
- // .SetThreshold(75)
- .SetOutput(coverageResultFile)
- .SetFormat(CoverletOutputFormat.cobertura));
+ _ = coverageResultDirectory.CreateDirectory();
+ _ = Coverlet(s => s
+ .SetTarget("dotnet")
+ .SetTargetArgs("test --no-build --no-restore")
+ .SetAssembly(testAssembly)
+ // .SetThreshold(75)
+ .SetOutput(coverageResultFile)
+ .SetFormat(CoverletOutputFormat.cobertura));
});
public Target TestReport => td => td
.DependsOn(Test)
.Executes(() =>
{
- _ = coverageReportDirectory.CreateDirectory();
- _ = ReportGenerator(s => s
- .SetTargetDirectory(coverageReportDirectory)
- .SetReportTypes([ReportTypes.Html, ReportTypes.TextSummary])
- .SetReports(coverageResultFile)
- );
+ _ = coverageReportDirectory.CreateDirectory();
+ _ = ReportGenerator(s => s
+ .SetTargetDirectory(coverageReportDirectory)
+ .SetReportTypes([ReportTypes.Html, ReportTypes.TextSummary])
+ .SetReports(coverageResultFile)
+ );
var summaryText = coverageReportSummaryDirectory.ReadAllLines();
Log.Information(string.Join(Environment.NewLine, summaryText));
});
diff --git a/.editorconfig b/.editorconfig
index a02ffc7a6d7a73b06a3f3d3d1ef497e5c7a5e2de..080a294fcb13bf2c8836c30f5e1ceade5fd77584 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -67,6 +67,7 @@ dotnet_diagnostic.CA2201.severity = error
dotnet_diagnostic.CA2208.severity = error
dotnet_diagnostic.CA2214.severity = error
dotnet_diagnostic.CS8019.severity = warning
+dotnet_diagnostic.IDE0055.severity = warning
[**/obj/**/*.cs]
dotnet_diagnostic.CS8019.severity = none # disable on debug genereated files
diff --git a/source/BuildCommand.cs b/source/BuildCommand.cs
index ae0f4d132b1f182b2a1486d63c932ba18e80157e..e023d280762e6c1945a0d8af8b7114ffb3c64d9f 100644
--- a/source/BuildCommand.cs
+++ b/source/BuildCommand.cs
@@ -51,7 +51,7 @@ public class BuildCommand : BaseGeneratorCommand
if (output is IPage page)
{
- var path = (url + (site.UglyURLs ? "" : "/index.html")).TrimStart('/');
+ var path = (url + (site.UglyURLs ? string.Empty : "/index.html")).TrimStart('/');
// Generate the output path
var outputAbsolutePath = Path.Combine(options.Output, path);
@@ -87,7 +87,7 @@ public class BuildCommand : BaseGeneratorCommand
///
/// Copy a folder content from source into the output folder.
- ///
+ ///
/// The source folder to copy from.
/// The output folder to copy to.
private static void CopyFolder(string source, string output)
diff --git a/source/Helpers/SourceFileWatcher.cs b/source/Helpers/SourceFileWatcher.cs
index bcacae6c145ccbad688b97f87c1c225668f9dd52..2a3bcce13e6c68393a16bbb37362acb58b71f006 100644
--- a/source/Helpers/SourceFileWatcher.cs
+++ b/source/Helpers/SourceFileWatcher.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace SuCoS.Helpers;
///
@@ -7,8 +9,8 @@ public sealed class SourceFileWatcher : IFileWatcher, IDisposable
{
///
/// The FileSystemWatcher object that monitors the source directory for file changes.
- /// When a change is detected, this triggers a server restart to ensure the served content
- /// remains up-to-date. The FileSystemWatcher is configured with the source directory
+ /// When a change is detected, this triggers a server restart to ensure the served content
+ /// remains up-to-date. The FileSystemWatcher is configured with the source directory
/// at construction and starts watching immediately.
///
private FileSystemWatcher? fileWatcher;
@@ -17,7 +19,7 @@ public sealed class SourceFileWatcher : IFileWatcher, IDisposable
public void Start(string SourceAbsolutePath, Action