If a class is using a lambda expression for a function, the analysis fails.
The class does not show the complexity numbers near the code.
Example:
public class SpecProgram : Program
{
private readonly Program _program;
private readonly Dialect _dialect;
public SpecProgram(Program program) : this(program, new SpecDialect())
{ }
public SpecProgram(Program program, Dialect dialect)
{
_program = program;
_dialect = dialect;
}
public string Key() => _program.Key(); //This leads to failure, removing it makes the analysis work
public ICollection<Command> Commands()
{
return _program.Commands()
.Select(c =>
new SpecCommand(c, _dialect)
).ToList<Command>();
}
public ICollection<Instruction> Parameters()
{
return _program.Parameters();
}
}
If a class is using a lambda expression for a function, the analysis fails. The class does not show the complexity numbers near the code.
Example: