Skip to content

Commit 211156a

Browse files
ANcpLuaclaude
andcommitted
fix: consolidate DateTime banned symbols to require TimeProvider
Lines 1-2 said "use UtcNow" but UtcNow was also banned below. Unified all four DateTime/DateTimeOffset properties to consistently point to TimeProvider.System.GetUtcNow(). Removed redundant M: getter bans since P: property bans already cover them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e2d4794 commit 211156a

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/Config/BannedSymbols.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
P:System.DateTime.Now;Use System.DateTime.UtcNow instead
2-
P:System.DateTimeOffset.Now;Use System.DateTimeOffset.UtcNow instead
3-
41
# DateTime - use TimeProvider.System.GetUtcNow()
5-
M:System.DateTime.get_Now
6-
M:System.DateTime.get_UtcNow
7-
M:System.DateTimeOffset.get_Now
8-
M:System.DateTimeOffset.get_UtcNow
2+
P:System.DateTime.Now;Use TimeProvider.System.GetUtcNow() instead
3+
P:System.DateTime.UtcNow;Use TimeProvider.System.GetUtcNow() instead
4+
P:System.DateTimeOffset.Now;Use TimeProvider.System.GetUtcNow() instead
5+
P:System.DateTimeOffset.UtcNow;Use TimeProvider.System.GetUtcNow() instead
96

107
# Guards - use Guard.NotNull() from ANcpLua.Roslyn.Utilities
118
M:System.ArgumentNullException.ThrowIfNull(System.Object,System.String)

0 commit comments

Comments
 (0)