enisn/AutoFilterer

View on GitHub
src/AutoFilterer/Attributes/CompareToAttribute.cs

Summary

Maintainability
A
30 mins
Test Coverage

Method BuildDefaultExpression has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

    public virtual Expression BuildDefaultExpression(Expression expressionBody, PropertyInfo targetProperty, PropertyInfo filterProperty, object value)
    {
        if (value is IFilter filter)
        {
            if (typeof(ICollection).IsAssignableFrom(targetProperty.PropertyType) || (targetProperty.PropertyType.IsConstructedGenericType && typeof(IEnumerable).IsAssignableFrom(targetProperty.PropertyType)))
Severity: Minor
Found in src/AutoFilterer/Attributes/CompareToAttribute.cs - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                return OperatorComparisonAttribute.Equal.BuildExpression(expressionBody, targetProperty, filterProperty, value);
    Severity: Major
    Found in src/AutoFilterer/Attributes/CompareToAttribute.cs - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status