Skip to content

Commit

Permalink
Updates from sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
k3ldar committed Aug 27, 2024
1 parent 70d2657 commit 92f9d71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore')"/>

<PropertyGroup>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<NoWarn>1701;1702;8032;8981;S125;S6967;S6964;S6670;S6934;S3267;IDE0290</NoWarn>
<RunAnalyzers>true</RunAnalyzers>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<NoWarn>1701;1702;8032;8981;S125;S6967;S6964;S6670;S6934;S3267;S3431;IDE0290</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>Shared.Key.pfx</AssemblyOriginatorKeyFile>
Expand Down
9 changes: 5 additions & 4 deletions Plugins/Cron.Plugin/Classes/MasterCronThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace Cron.Plugin.Classes
internal sealed class MasterCronThread : ThreadManager
{
private const int ZeroIntervals = 0;
private const string InvalidCronJob = "Invalid CronJob Thread";
private readonly ICronJobProvider _cronProvider;
private readonly List<CronThreadJob> _cronJobs = [];
private readonly ILogger _logger;
Expand Down Expand Up @@ -101,7 +102,7 @@ private void JobThread_ThreadFinishing(object sender, Shared.ThreadManagerEventA
}
else
{
_logger.AddToLog(PluginManager.LogLevel.Error, "Invalid CronJob Thread");
_logger.AddToLog(PluginManager.LogLevel.Error, InvalidCronJob);
}
}

Expand All @@ -113,7 +114,7 @@ private void JobThread_ThreadStarting(object sender, Shared.ThreadManagerEventAr
}
else
{
_logger.AddToLog(PluginManager.LogLevel.Error, "Invalid CronJob Thread");
_logger.AddToLog(PluginManager.LogLevel.Error, InvalidCronJob);
}
}

Expand All @@ -125,7 +126,7 @@ private void JobThread_ThreadCancelRequested(object sender, Shared.ThreadManager
}
else
{
_logger.AddToLog(PluginManager.LogLevel.Error, "Invalid CronJob Thread");
_logger.AddToLog(PluginManager.LogLevel.Error, InvalidCronJob);
}
}

Expand All @@ -138,7 +139,7 @@ private void JobThread_ExceptionRaised(object sender, Shared.ThreadManagerExcept
}
else
{
_logger.AddToLog(PluginManager.LogLevel.Error, "Invalid CronJob Thread");
_logger.AddToLog(PluginManager.LogLevel.Error, InvalidCronJob);
}
}

Expand Down

0 comments on commit 92f9d71

Please sign in to comment.