Skip to content

Commit

Permalink
Turn on the All option for the AnalysisMode
Browse files Browse the repository at this point in the history
  • Loading branch information
odinserj committed Dec 26, 2023
1 parent eb6fa12 commit 23c2943
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Cronos/CronExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text;

Expand Down Expand Up @@ -245,7 +244,9 @@ public IEnumerable<DateTime> GetOccurrences(

var fromOffset = new DateTimeOffset(fromUtc);

#pragma warning disable CA1062
var occurrence = GetOccurrenceConsideringTimeZone(fromOffset, zone, inclusive);
#pragma warning restore CA1062

return occurrence?.UtcDateTime;
}
Expand Down Expand Up @@ -294,7 +295,9 @@ public IEnumerable<DateTime> GetOccurrences(
return new DateTimeOffset(found, TimeSpan.Zero);
}

#pragma warning disable CA1062
return GetOccurrenceConsideringTimeZone(from, zone, inclusive);
#pragma warning restore CA1062
}

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/Cronos/CronFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public enum CronFormat
/// <summary>
/// Parsing string must contain only 5 fields: minute, hour, day of month, month, day of week.
/// </summary>
#pragma warning disable CA1008
Standard = 0,
#pragma warning restore CA1008

/// <summary>
/// Second field must be specified in parsing string.
Expand Down
2 changes: 1 addition & 1 deletion src/Cronos/Cronos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>Recommended</AnalysisMode>
<AnalysisMode>All</AnalysisMode>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>

0 comments on commit 23c2943

Please sign in to comment.