Aller au contenu

Commented-out code (ARCH716)

Ce contenu n’est pas encore disponible dans votre langue.

Key dotnet.codequality.commented-out-code · Severity info · Category codequality

Flags a comment that is code - statements or members that parse as C# - rather than prose. It is never compiled, so it drifts from the code around it, and version control already keeps the old version. TODO, FIXME, licence headers and examples are not counted.

public decimal Total()
{
// var discount = Customer.Discount;
// total -= total * discount;
return Lines.Sum(l => l.Amount);
}
public decimal Total()
{
return Lines.Sum(l => l.Amount);
}