microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

File 20190315092242_AddingModelseForInsight.Designer.cs has 1283 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

    File 20240619132520_AddPinCodeEmployeeNoToWorker.cs has 1191 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using Microsoft.EntityFrameworkCore.Metadata;
    using Microsoft.EntityFrameworkCore.Migrations;
    
    #nullable disable
    
    
    Severity: Major
    Found in eFormCore/Migrations/20240619132520_AddPinCodeEmployeeNoToWorker.cs - About 3 days to fix

      File 20180810124416_InitialCreate.cs has 1181 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using System;
      using System.Collections.Generic;
      using Microsoft.EntityFrameworkCore.Metadata;
      using Microsoft.EntityFrameworkCore.Migrations;
      
      
      Severity: Major
      Found in eFormCore/Migrations/20180810124416_InitialCreate.cs - About 3 days to fix

        Method Up has 598 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                protected override void Up(MigrationBuilder migrationBuilder)
                {
                    migrationBuilder.AlterColumn<int>(
                        name: "Id",
                        table: "WorkerVersions",
        Severity: Major
        Found in eFormCore/Migrations/20240619132520_AddPinCodeEmployeeNoToWorker.cs - About 2 days to fix

          Class Core has 151 methods (exceeds 20 allowed). Consider refactoring.
          Open

              public class Core : CoreBase
              {
                  // events
                  public event EventHandler HandleCaseCreated;
                  public event EventHandler HandleCaseRetrived;
          Severity: Major
          Found in eFormCore/Core.cs - About 2 days to fix

            Method ChecksCreate has a Cognitive Complexity of 161 (exceeds 20 allowed). Consider refactoring.
            Open

                    public async Task<List<int>> ChecksCreate(Response response, string xmlString, int xmlIndex)
                    {
                        string methodName = "SqlController.ChecksCreate";
                        List<int> uploadedDataIds = new List<int>();
                        try
            Severity: Minor
            Found in eFormCore/Infrastructure/SqlController.cs - About 2 days to fix

            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

            Method Core_EntityGroup_Advanced_EntityGroupAll_ReturnsEntityGroups has 592 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Test]
                    public async Task Core_EntityGroup_Advanced_EntityGroupAll_ReturnsEntityGroups()
                    {
                        // Arrance
            
            
            Severity: Major
            Found in eFormSDK.Integration.Base.CoreTests/CoreTestEntity.cs - About 2 days to fix

              Method SQL_EntityGroup_EntityGroupAll_ReturnsEntityGroups has 590 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Test]
                      public async Task SQL_EntityGroup_EntityGroupAll_ReturnsEntityGroups()
                      {
                          // Arrance
              
              

                Method Down has 582 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        protected override void Down(MigrationBuilder migrationBuilder)
                        {
                            migrationBuilder.DropColumn(
                                name: "EmployeeNo",
                                table: "WorkerVersions");
                Severity: Major
                Found in eFormCore/Migrations/20240619132520_AddPinCodeEmployeeNoToWorker.cs - About 2 days to fix

                  Method ReadFieldValue has a Cognitive Complexity of 154 (exceeds 20 allowed). Consider refactoring.
                  Open

                          private async Task<Models.FieldValue> ReadFieldValue(MicrotingDbContext db, FieldValue reply, Field dbField, bool joinUploadedData,
                              Language language)
                          {
                              string methodName = "SqlController.ReadFieldValue";
                              try
                  Severity: Minor
                  Found in eFormCore/Infrastructure/SqlController.cs - About 2 days to fix

                  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

                  File SqlControllerTestCase.cs has 1107 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  using System;
                  using System.Collections.Generic;
                  using System.Globalization;
                  using System.Linq;
                  using System.Threading.Tasks;
                  Severity: Major
                  Found in eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs - About 2 days to fix

                    Class SqlController has 131 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        public class SqlController : LogWriter
                        {
                            // var
                    
                            private Log _log;
                    Severity: Major
                    Found in eFormCore/Infrastructure/SqlController.cs - About 2 days to fix

                      File SqlControllerTestCaseReadAllShort.cs has 988 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

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

                        File 20190116110009_AddingOriginalId.Designer.cs has 971 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        using System;
                        using Microsoft.EntityFrameworkCore;
                        using Microsoft.EntityFrameworkCore.Infrastructure;
                        using Microsoft.EntityFrameworkCore.Metadata;
                        using Microsoft.EntityFrameworkCore.Migrations;
                        Severity: Major
                        Found in eFormCore/Migrations/20190116110009_AddingOriginalId.Designer.cs - About 2 days to fix

                          File 20180810124416_InitialCreate.Designer.cs has 967 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          using System;
                          using Microsoft.EntityFrameworkCore;
                          using Microsoft.EntityFrameworkCore.Infrastructure;
                          using Microsoft.EntityFrameworkCore.Metadata;
                          using Microsoft.EntityFrameworkCore.Migrations;
                          Severity: Major
                          Found in eFormCore/Migrations/20180810124416_InitialCreate.Designer.cs - About 2 days to fix

                            Method SubChecks has a Cognitive Complexity of 133 (exceeds 20 allowed). Consider refactoring.
                            Open

                                    private async Task<Element> SubChecks(MicrotingDbContext db, int parentId, Case theCase, Language language)
                                    {
                                        string methodName = "SqlController.SubChecks";
                                        try
                                        {
                            Severity: Minor
                            Found in eFormCore/Infrastructure/SqlController.cs - About 2 days to fix

                            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

                            Method Up has 474 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    protected override void Up(MigrationBuilder migrationBuilder)
                                    {
                                        //Setup for SQL Server Provider
                                       
                                        string autoIDGenStrategy = "SqlServer:ValueGenerationStrategy";
                            Severity: Major
                            Found in eFormCore/Migrations/20190509074123_RefactoringidtoId.cs - About 2 days to fix

                              Method Core_eForm_OptionsWithMicrotingFormCreateInDB_ReturnseFormId has 472 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      [Test]
                                      public async Task Core_eForm_OptionsWithMicrotingFormCreateInDB_ReturnseFormId()
                                      {
                                          // Arrange
                                          string xmlstring = @"
                              Severity: Major
                              Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormCreateInDB.cs - About 2 days to fix

                                Method CaseReadAll has a Cognitive Complexity of 131 (exceeds 20 allowed). Consider refactoring.
                                Open

                                        public async Task<CaseList> CaseReadAll(int? templatId, DateTime? start, DateTime? end, string workflowState,
                                            string searchKey, bool descendingSort, string sortParameter, int offSet, int pageSize,
                                            TimeZoneInfo timeZoneInfo)
                                        {
                                            string methodName = "SqlController.CaseReadAll";
                                Severity: Minor
                                Found in eFormCore/Infrastructure/SqlController.cs - About 2 days to fix

                                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

                                File CoreTestCase.cs has 945 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                using System;
                                using System.Collections.Generic;
                                using System.IO;
                                using System.Linq;
                                using System.Reflection;
                                Severity: Major
                                Found in eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs - About 2 days to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language