Naming and Contract Alignment
Detects method renames where the new CRUD verb semantically contradicts the old verb, signaling an intent mismatch.
Why this rule exists
Renaming Delete to Get keeps the old behavior but advertises a new contract. Callers see Get and assume safety; the method still deletes. Rename refactors must match new behavior, not just new vocabulary.
Code example
- public void DeleteOrder(int id) { _repo.Remove(id); _repo.Save(); }
+ public void GetOrder(int id) { _repo.Remove(id); _repo.Save(); }- public void DeleteOrder(int id) { _repo.Remove(id); _repo.Save(); }
+ public Order GetOrder(int id) => _repo.Find(id);
+ public void DeleteOrder(int id) { _repo.Remove(id); _repo.Save(); }Configuration
Disable or adjust the severity of this rule in .gauntletci.json:
{
"rules": {
"GCI0047": { "enabled": true, "severity": "Info" }
}
}See Configuration for the full schema.
Related rules
Breaking Change Risk
Detects [Obsolete] attribute additions and removals on public APIs. Removing a deprecation guard is Block-severity; adding one is a Warn-level review signal.
Pattern Consistency Deviation
Detects mixed sync/async naming conventions and service locator anti-patterns introduced inconsistently within the same file.
Discussed in
Detect Breaking Changes Before Merge
How to catch removed public APIs, signature changes, and serialization breaks at commit time instead of in downstream consumers.
How Azure SDK PR #57223 Introduced 6,650+ Unique Risk Signals
Azure SDK PR #57223 generated 6,650+ unique behavioral risk signals across 3 framework versions. See why traditional tools missed them.
Implemented in src/GauntletCI.Core/Rules/Implementations/GCI0047_*.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.
