Synchronous File I/O
Detects synchronous File.ReadAllText/WriteAllText and similar calls. Blocking async patterns are covered by GCI0016.
Why this rule exists
Sync file I/O blocks thread-pool threads under load. Async variants yield during I/O.
Code example
+ var json = File.ReadAllText(path);+ var json = await File.ReadAllTextAsync(path, ct);Configuration
Disable or adjust the severity of this rule in .gauntletci.json:
{
"rules": {
"GCI0057": { "enabled": true, "severity": "Warn" }
}
}See Configuration for the full schema.
Related rules
Concurrency and State Risk
Detects async void methods, blocking async calls (.Result, .Wait()), static mutable state, and patterns that introduce deadlock risk.
Resource Lifecycle
Detects disposable resources allocated without a using statement or try/finally disposal, leading to connection and handle leaks.
Implemented in src/GauntletCI.Core/Rules/Implementations/GCI0057_*.cs.
Eric Cogen -- Founder, GauntletCI
Twenty years as a senior technical consultant building and modernizing enterprise platforms across .NET, AWS, serverless, microservices, and AI-driven systems.
