microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

Method TemplateUploadData has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring.
Open

        public async Task<MainElement> TemplateUploadData(MainElement mainElement)
        {
            if (mainElement == null)
                throw new ArgumentNullException(nameof(mainElement), "mainElement not allowed to be null");

Severity: Minor
Found in eFormCore/Core.cs - About 4 hrs 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_eForm_SimpleFieldGroupsFormFromXML_ReturnseMainElement has 110 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        [Test]
        public async Task Core_eForm_SimpleFieldGroupsFormFromXML_ReturnseMainElement()
        {
            // Arrange
            string xmlstring = @"
Severity: Major
Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs - About 4 hrs to fix

    Method Up has 110 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/20190806093044_AddingSiteGroups.cs - About 4 hrs to fix

      Method QuestionTranslation_Update_DoesUpdate_W_MicrotingUID_RemovesUid has 110 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [Test]
              public async Task QuestionTranslation_Update_DoesUpdate_W_MicrotingUID_RemovesUid()
              {
                  Random rnd = new Random();
      
      
      Severity: Major
      Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 4 hrs to fix

        Method SQL_Check_FieldValueReadWithUploadedData_ReturnsAnswer has 109 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method SQL_Site_SiteReadSimple_ReadsSite has 108 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [Test]
                  public async Task SQL_Site_SiteReadSimple_ReadsSite()
                  {
                      // Arrance
          
          
          Severity: Major
          Found in eFormSDK.Integration.Tests/SqlControllerTestSite.cs - About 4 hrs to fix

            Method QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID_AddsUID has 108 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Test]
                    public async Task QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID_AddsUID()
                    {
                        Random rnd = new Random();
            
            
            Severity: Major
            Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 4 hrs to fix

              Method QuestionTranslation_Update_DoesUpdate_W_MicrotingUID has 108 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Test]
                      public async Task QuestionTranslation_Update_DoesUpdate_W_MicrotingUID()
                      {
                          Random rnd = new Random();
              
              
              Severity: Major
              Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 4 hrs to fix

                Method SQL_PostCase_CaseFindCustomMatchs has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method SQL_Site_SiteDelete_DeletesSite has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          [Test]
                          public async Task SQL_Site_SiteDelete_DeletesSite()
                          {
                              // Arrance
                  
                  
                  Severity: Major
                  Found in eFormSDK.Integration.Tests/SqlControllerTestSite.cs - About 4 hrs to fix

                    Method SQL_Site_SiteUpdate_UpdatesSite has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            [Test]
                            public async Task SQL_Site_SiteUpdate_UpdatesSite()
                            {
                                // Arrance
                    
                    
                    Severity: Major
                    Found in eFormSDK.Integration.Tests/SqlControllerTestSite.cs - About 4 hrs to fix

                      Method Answer_Delete_DoesSetWorkflowStateToRemoved has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              [Test]
                              public async Task Answer_Delete_DoesSetWorkflowStateToRemoved()
                              {
                                  //Arrange
                      
                      
                      Severity: Major
                      Found in eFormSDK.InSight.Tests/AnswersUTest.cs - About 4 hrs to fix

                        Method GetExtraFieldValues has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring.
                        Open

                                private async Task<string> GetExtraFieldValues(int caseId, string customPathForUploadedData, Language language)
                                {
                                    var token = await GetSdkSetting(Settings.token);
                                    var db = DbContextHelper.GetDbContext();
                                    StringBuilder jasperFieldXml = new StringBuilder();
                        Severity: Minor
                        Found in eFormCore/Core.cs - About 4 hrs 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 QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                [Test]
                                public async Task QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID()
                                {
                                    Random rnd = new Random();
                        
                        
                        Severity: Major
                        Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 4 hrs to fix

                          File Response.cs has 341 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          using System;
                          using System.Collections.Generic;
                          using System.IO;
                          using System.Text;
                          using System.Xml;
                          Severity: Minor
                          Found in eFormCore/Infrastructure/Models/reply/Response.cs - About 4 hrs to fix

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

                                    [Test]
                                    public async Task SQL_answerValues_Delete_DoesDelete()
                                    {
                                        // Arrange
                                        Random rnd = new Random();
                            Severity: Major
                            Found in eFormSDK.Integration.Tests/SqlControllerTestAnswerValue.cs - About 4 hrs to fix

                              Method GetAnswersForQuestionSet has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring.
                              Open

                                      public async Task GetAnswersForQuestionSet(int? apiQuestionSetId)
                                      {
                                          if (apiQuestionSetId == null)
                                              return;
                              
                              
                              Severity: Minor
                              Found in eFormCore/Core.cs - About 4 hrs 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 SQL_Check_CheckListValueStatusUpdate_UpdatesCheckListValues has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      [Test]
                                      public async Task SQL_Check_CheckListValueStatusUpdate_UpdatesCheckListValues()
                                      {
                                          // Arrance
                                          #region Arrance
                              Severity: Major
                              Found in eFormSDK.Integration.Tests/SqlControllerTestCheckListValue.cs - About 4 hrs to fix

                                Method SQL_Site_SiteRead_ReadsSite has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        [Test]
                                        public async Task SQL_Site_SiteRead_ReadsSite()
                                        {
                                
                                            // Arrance
                                Severity: Major
                                Found in eFormSDK.Integration.Tests/SqlControllerTestSite.cs - About 4 hrs to fix

                                  Method SQL_answerValues_Create_DoesCreate has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          [Test]
                                          public async Task SQL_answerValues_Create_DoesCreate()
                                          {
                                              // Arrange
                                              Random rnd = new Random();
                                  Severity: Major
                                  Found in eFormSDK.Integration.Tests/SqlControllerTestAnswerValue.cs - About 4 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language