microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

File Communicator.cs has 689 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Microting.eForm.Dto;
Severity: Major
Found in eFormCore/Communication/Communicator.cs - About 1 day to fix

    File FieldValuesUTest.cs has 688 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;
    Severity: Major
    Found in eFormSDK.CheckLists.Tests/FieldValuesUTest.cs - About 1 day to fix

      Method Fields_Update_DoesUpdate has 308 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [Test]
              public async Task Fields_Update_DoesUpdate()
              {
                  short shortMinValue = Int16.MinValue;
                  short shortmaxValue = Int16.MaxValue;
      Severity: Major
      Found in eFormSDK.CheckLists.Tests/FieldsUTest.cs - About 1 day to fix

        Method DocxToPdf has 308 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private async Task<string> DocxToPdf(int caseId, string templateId, string timeStamp,
                    Microting.eForm.Infrastructure.Data.Entities.Case dbCase, CaseDto cDto, string customPathForUploadedData,
                    string customXmlContent, string fileType, Language language)
                {
                    SortedDictionary<string, string> valuePairs = new SortedDictionary<string, string>();
        Severity: Major
        Found in eFormCore/Core.cs - About 1 day to fix

          File QuestionTranslationUTest.cs has 657 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;
          Severity: Major
          Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 1 day to fix

            Method SQL_PostCase_CaseUpdateFieldValues has 294 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Test]
                    public async Task SQL_PostCase_CaseUpdateFieldValues()
                    {
                        // Arrance
            
            
            Severity: Major
            Found in eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs - About 1 day to fix

              Method Core_Case_CaseUpdate_ReturnsTrue has 288 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Test]
                      public async Task Core_Case_CaseUpdate_ReturnsTrue()
                      {
                          // Arrange
              
              
              Severity: Major
              Found in eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs - About 1 day to fix

                Method DownloadUploadedData has 285 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public async Task<bool> DownloadUploadedData(int uploadedDataId)
                        {
                            string methodName = "Core.DownloadUploadedData";
                            Microting.eForm.Infrastructure.Data.Entities.UploadedData uploadedData =
                                await _sqlController.GetUploadedData(uploadedDataId).ConfigureAwait(false);
                Severity: Major
                Found in eFormCore/Core.cs - About 1 day to fix

                  File SqlControllerTestSiteWorker.cs has 636 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  using eFormCore;
                  using Microsoft.EntityFrameworkCore;
                  using NUnit.Framework;
                  using System;
                  using System.Collections.Generic;
                  Severity: Major
                  Found in eFormSDK.Integration.Tests/SqlControllerTestSiteWorker.cs - About 1 day to fix

                    Method ChecksCreate has 276 lines of code (exceeds 25 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: Major
                    Found in eFormCore/Infrastructure/SqlController.cs - About 1 day to fix

                      Method Core_Case_CaseUpdate_ReturnsTrue has 272 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              [Test]
                              public async Task Core_Case_CaseUpdate_ReturnsTrue()
                              {
                                  // Arrange
                                  #region Arrance
                      Severity: Major
                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

                        Method SQL_EntityGroup_EntityGroupUpdate_UpdatesEntityGroup has 266 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method SQL_EntityGroup_EntityGroupDelete_DeletesEntityGroup has 266 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Method SQL_EntityGroup_EntityGroupUpdateName_UpdatesEnityGroupName has 266 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method CaseUpdateFieldValues has a Cognitive Complexity of 82 (exceeds 20 allowed). Consider refactoring.
                              Open

                                      public async Task<bool> CaseUpdateFieldValues(int caseId, Language language)
                                      {
                                          string methodName = "SqlController.CaseUpdateFieldValues";
                                          try
                                          {
                              Severity: Minor
                              Found in eFormCore/Infrastructure/SqlController.cs - About 1 day 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 CheckListsUTest.cs has 602 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;
                              Severity: Major
                              Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs - About 1 day to fix

                                Method Core_Case_CaseToJasperXml_ReturnsPath has 261 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        [Test]
                                        public async Task Core_Case_CaseToJasperXml_ReturnsPath()
                                        {
                                            // Arrange
                                            #region Arrance
                                Severity: Major
                                Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

                                  File DataItem.cs has 595 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  using System;
                                  using System.Collections.Generic;
                                  using System.Xml.Serialization;
                                  using Microting.eForm.Dto;
                                  using KeyValuePair = Microting.eForm.Dto.KeyValuePair;
                                  Severity: Major
                                  Found in eFormCore/Infrastructure/Models/DataItem.cs - About 1 day to fix

                                    Method Core_Case_GetHttpServerAddress_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            [Test]
                                            public async Task Core_Case_GetHttpServerAddress_returnsPath()
                                            {
                                                // Arrange
                                                #region Arrance
                                    Severity: Major
                                    Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

                                      Method Core_Case_GetPdfPath_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              [Test]
                                              public async Task Core_Case_GetPdfPath_returnsPath()
                                              {
                                                  // Arrange
                                                  #region Arrance
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language