S3L0003: Let it breathe¶
A method of several statements puts a blank line before its final return.
| Category | Snail |
| Severity | warning — an error under TreatWarningsAsErrors, which every Snail project builds with |
| Analyzer | ReturnShape in Snail.Sdk.Analyzers |
| Code fix | Put a blank line before the return, Fix All supported |
What it reports¶
A method, local function or accessor whose block has 4 statements or more and ends with a return that has no
blank line before it. The finding is on the return keyword.
Why¶
The answer is a phase of its own. A blank line separates it from the work before it, so the eye finds what a method returns without reading what it did.
Measured across the fleet on 2026-10-12: 98–99 % of methods of four statements or more already carry the blank line, against 95 % of methods of two or three — which is why the rule asks it of four and leaves shorter blocks alone.
How to fix¶
var user = await users.FindAsync(id);
var orders = await store.OrdersOfAsync(user);
var total = orders.Sum(order => order.Amount);
logger.LogTotal(user.Id, total);
return total;
The code fix¶
Inserts the blank line, in the document's own line endings. Fix All applies it to a document, project or solution.
Suppressing it¶
Fix the code rather than silence the rule: the rule is part of the standard every Snail repository keeps. Where one place truly must differ, suppress that place and say why:
[SuppressMessage("Snail", "S3L0003:Let it breathe", Justification = "<why this place differs>")]
A NoWarn in a project or props file would hide the rule from every new line too; the
conformance check reports one as migration debt (S3LC0017).