onebeyond/onebeyond-studio-core

View on GitHub

Showing 90 of 368 total issues

File FilteredIncludesTests.cs has 714 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Severity: Major
Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/FilteredIncludesTests.cs - About 1 day to fix

    File FilterExpressionBuilder.cs has 697 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System;
    using System.Collections.Concurrent;
    using System.Collections.Generic;
    using System.Linq;
    using System.Linq.Expressions;

      File FilterExpressionBuilderTests.cs has 515 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Text;
      using Ardalis.SmartEnum;

        File AuditDataProvider.cs has 411 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using System.Collections.Generic;
        using System.Linq;
        using System.Threading;
        using System.Threading.Tasks;

          Method TestFilteredIncludeWithMultiplePathsLoadsOnlyRequestedChildren has 125 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              [TestMethod]
              public async Task TestFilteredIncludeWithMultiplePathsLoadsOnlyRequestedChildren()
              {
                  var purchaseOrderId = default(Guid);
          
          
          Severity: Major
          Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/FilteredIncludesTests.cs - About 5 hrs to fix

            Method TestEFStyleFilteredIncludeWithMultiplePathsLoadsOnlyRequestedChildren has 119 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                [TestMethod]
                public async Task TestEFStyleFilteredIncludeWithMultiplePathsLoadsOnlyRequestedChildren()
                {
                    var purchaseOrderId = default(Guid);
            
            
            Severity: Major
            Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/FilteredIncludesTests.cs - About 4 hrs to fix

              Class FilterExpressionBuilderTests has 36 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public sealed class FilterExpressionBuilderTests : IClassFixture<LogManagerFixture>
              {
                  private enum TestEnum
                  {
                      TestValue = 1

                File EFPlusIncludes.cs has 346 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using System;
                using System.Collections.Concurrent;
                using System.Collections.Generic;
                using System.Linq;
                using System.Linq.Expressions;
                Severity: Minor
                Found in src/OneBeyond.Studio.DataAccess.EFCore/Repositories/EFPlusIncludes.cs - About 4 hrs to fix

                  Method TestFilteredIncludeLoadsOnlyRequestedChildren has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      [TestMethod]
                      public async Task TestFilteredIncludeLoadsOnlyRequestedChildren()
                      {
                          var purchaseOrderId = default(Guid);
                  
                  
                  Severity: Major
                  Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/FilteredIncludesTests.cs - About 4 hrs to fix

                    Method TestFilteredIncludeWithSingleEntityPathLoadsOnlyRequestedChildren has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        [TestMethod]
                        public async Task TestFilteredIncludeWithSingleEntityPathLoadsOnlyRequestedChildren()
                        {
                            var vendorId = default(Guid);
                    
                    
                    Severity: Major
                    Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/FilteredIncludesTests.cs - About 4 hrs to fix

                      Method TestEFStyleFilteredIncludeWithSingleEntityPathLoadsOnlyRequestedChildren has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          [TestMethod]
                          public async Task TestEFStyleFilteredIncludeWithSingleEntityPathLoadsOnlyRequestedChildren()
                          {
                              var vendorId = default(Guid);
                      
                      
                      Severity: Major
                      Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/FilteredIncludesTests.cs - About 4 hrs to fix

                        Method TestEFStyleFilteredIncludeLoadsOnlyRequestedChildren has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            [TestMethod]
                            public async Task TestEFStyleFilteredIncludeLoadsOnlyRequestedChildren()
                            {
                                var purchaseOrderId = default(Guid);
                        
                        
                        Severity: Major
                        Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/FilteredIncludesTests.cs - About 4 hrs to fix

                          Method TestAnonymousList has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              [TestMethod]
                              public async Task TestAnonymousList()
                              {
                                  var product1 = new Product("ring", "jewelery", "cartier", 999.99M, "france");
                                  var product2 = new Product("ring", "jewelery", "tiffany", 1999.99M, "us");
                          Severity: Major
                          Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/AnonymousTypesTests.cs - About 3 hrs to fix

                            File BaseRORepository.cs has 306 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            using System;
                            using System.Collections.Generic;
                            using System.ComponentModel;
                            using System.Linq;
                            using System.Linq.Expressions;

                              Method TestTPTLikeHierarchy has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  [TestMethod]
                                  public async Task TestTPTLikeHierarchy()
                                  {
                                      var baAirlineId = default(Guid);
                                      var lhAirlineId = default(Guid);
                              Severity: Major
                              Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/DesignIdeasTests.cs - About 3 hrs to fix

                                Method TestDomainEventHandlersAreCalledAndDomainEventsAreQueued has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    [TestMethod]
                                    public async Task TestDomainEventHandlersAreCalledAndDomainEventsAreQueued()
                                    {
                                        var purchaseOrderId = default(Guid);
                                
                                
                                Severity: Major
                                Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/DomainEventsTests.cs - About 3 hrs to fix

                                  Method TryConvertFromString has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private static bool TryConvertFromString(string valueToken, Type type, out object? value)
                                      {
                                          valueToken = TrimEqualsFunction(valueToken);
                                          try
                                          {

                                    Method Handle has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public async Task<TResponse> Handle(
                                            TRequest request,
                                            RequestHandlerDelegate<TResponse> next,
                                            CancellationToken cancellationToken)
                                        {

                                      Class FileValidatorBuilder has 23 methods (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      public sealed class FileValidatorBuilder
                                      {
                                          private readonly Dictionary<string, IFileContentValidator> _validators = new();
                                          private int? _maxFileSizeInBytes = null;
                                      
                                      

                                        Method TryConvertFromString has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
                                        Open

                                            private static bool TryConvertFromString(string valueToken, Type type, out object? value)
                                            {
                                                valueToken = TrimEqualsFunction(valueToken);
                                                try
                                                {

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language