enisn/AutoFilterer

View on GitHub

Showing 5 of 17 total issues

Method BuildExpression has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public virtual Expression BuildExpression(Type entityType, Expression body)
    {
        Expression finalExpression = body;
        var _type = this.GetType();
        foreach (var filterProperty in _type.GetProperties())
Severity: Minor
Found in src/AutoFilterer/Types/FilterBase.cs - About 1 hr to fix

    Method BuildExpression has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public Expression BuildExpression(Type entityType, Expression body)
        {
            Expression finalExpression = body;
    
            foreach (var key in this.Keys)
    Severity: Minor
    Found in src/AutoFilterer.Dynamics/DynamicFilter.cs - About 1 hr to fix

      Method BuildExpression has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public virtual Expression BuildExpression(Expression body, PropertyInfo targetProperty, PropertyInfo filterProperty, object value)
          {
              return GetRangeComparison();
      
              BinaryExpression GetRangeComparison()
      Severity: Minor
      Found in src/AutoFilterer/Types/Range.cs - About 1 hr to fix

        Method GetFilterDtoCode has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            internal string GetFilterDtoCode(string className, IEnumerable<IPropertySymbol> properties,
                string @namespace = null)
            {
                var start = $@"
        using System;
        Severity: Minor
        Found in src/AutoFilterer.Generators/FilterGenerator.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
            Severity
            Category
            Status
            Source
            Language