All rules

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

Triggers the rule
+ var json = File.ReadAllText(path);
Passes the rule
+ 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

Implemented in src/GauntletCI.Core/Rules/Implementations/GCI0057_*.cs.

About the author

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.