-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBannedSymbols.txt
More file actions
21 lines (17 loc) · 1.81 KB
/
BannedSymbols.txt
File metadata and controls
21 lines (17 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Banned API Symbols
# This file defines APIs that are banned from use in the codebase.
# Each line should contain a banned symbol followed by an optional reason.
# Sleep Semantics - Banned to enforce deterministic timing
M:System.Threading.Tasks.Task.Delay(System.Int32)|Use deterministic wait helpers instead of Task.Delay(int). Consider WaitForMetricValueAsync or System.TimeProvider for deterministic timing.
M:System.Threading.Tasks.Task.Delay(System.TimeSpan)|Use deterministic wait helpers instead of Task.Delay(TimeSpan). Consider WaitForMetricValueAsync or System.TimeProvider for deterministic timing.
# Task.Delay with CancellationToken is allowed for cancellation testing scenarios
# Thread.Sleep - Banned to enforce deterministic timing
M:System.Threading.Thread.Sleep(System.Int32)|Use deterministic wait helpers instead of Thread.Sleep(int). Consider WaitForMetricValueAsync or System.TimeProvider for deterministic timing.
M:System.Threading.Thread.Sleep(System.TimeSpan)|Use deterministic wait helpers instead of Thread.Sleep(TimeSpan). Consider WaitForMetricValueAsync or System.TimeProvider for deterministic timing.
# DateTime.Now - Banned to enforce testable time handling
P:System.DateTime.Now|Use System.TimeProvider or DateTimeOffset.UtcNow instead of DateTime.Now for testable time handling.
P:System.DateTime.Today|Use System.TimeProvider or DateTimeOffset.UtcNow instead of DateTime.Today for testable time handling.
P:System.DateTimeOffset.Now|Use System.TimeProvider or DateTimeOffset.UtcNow for testable time handling.
# Environment.TickCount - Banned to enforce testable time handling
P:System.Environment.TickCount|Use System.TimeProvider instead of Environment.TickCount for testable time handling.
P:System.Environment.TickCount64|Use System.TimeProvider instead of Environment.TickCount64 for testable time handling.