Skip to main content
ai-slop/csharp-not-implementedmanual fix

NotImplementedException stub.

`throw new NotImplementedException()` in shipped code. The member compiles; the caller fails at runtime.

Flagged shape and clean shape.

Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.

csharp-not-implemented.cs
✗ Flagged
public class S3Storage : IStorage
{
    public Task UploadAsync(Blob blob) => _client.PutAsync(blob);

    public Task DeleteAsync(string key)
    {
        throw new NotImplementedException();
    }
}
Why this trips

Deterministic line match on masked source: flags `throw new NotImplementedException(` outside comments and strings.

csharp-not-implemented.cs
✓ Clean
public class S3Storage : IStorage
{
    public Task UploadAsync(Blob blob) => _client.PutAsync(blob);

    public Task DeleteAsync(string key) => _client.DeleteObjectAsync(_bucket, key);
}
What changed

Implement the member. If it is intentionally unsupported, throw `NotSupportedException`; if the work is deferred, track it in a ticket rather than shipping the stub.

IDE scaffolding and agents generate members with this placeholder body to satisfy an interface, and the stub survives because nothing fails until that path runs.

How this rule is justified.

Rule id

ai-slop/csharp-not-implemented

Enforcing engine

ai-slop

Detector strategy

Deterministic line match on masked source: flags `throw new NotImplementedException(` outside comments and strings.

Legitimate code that is NOT flagged

Test files and generated files are not flagged. `NotSupportedException`, the conventional signal for an intentionally unsupported member, is not matched.

Evidence

Part of aislop's C# rule set. First-class C# support, including C#-specific AI-slop rules, arrived in aislop v0.14.1.