microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

Method SQL_SiteWorker_SiteWorkerRead_ReadsSiteWorker has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        [Test]
        public async Task SQL_SiteWorker_SiteWorkerRead_ReadsSiteWorker()
        {

            // Arrance
Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestSiteWorker.cs - About 5 hrs to fix

    Method GetExtraFieldValues has 138 lines of code (exceeds 25 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: Major
    Found in eFormCore/Core.cs - About 5 hrs to fix

      Method SQL_Worker_WorkerRead_ReadsWorker has 137 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method SQL_Worker_WorkerNameRead_ReadsName has 136 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method SQL_SiteWorker_SiteWorkerDelete_DeletesSiteWorker has 136 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method SQL_SiteWorker_SiteWorkerUpdate_UpdatesSiteWorker has 136 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method SQL_SiteWorker_SiteWorkerCreate_ReturnsID has 136 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method SQL_Worker_WorkerUpdate_UpdatesWorker has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method SQL_Worker_WorkerDelete_DeletesWorker has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Method TemplateItemReadAll has a Cognitive Complexity of 51 (exceeds 20 allowed). Consider refactoring.
                    Open

                            public async Task<List<Template_Dto>> TemplateItemReadAll(bool includeRemoved, string siteWorkflowState,
                                string searchKey, bool descendingSort, string sortParameter, List<int> tagIds, TimeZoneInfo timeZoneInfo,
                                Language language)
                            {
                                string methodName = "SqlController.TemplateItemReadAll";
                    Severity: Minor
                    Found in eFormCore/Infrastructure/SqlController.cs - About 5 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_SimpleMultiSelectFormFromXML_ReturnseMainElement has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      File CheckListValuesUTest.cs has 390 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: Minor
                      Found in eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs - About 5 hrs to fix

                        Method SQL_Unit_UnitCreate_CreatesUnit has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method SQL_Check_FieldValueReadAllValues_ReturnsReturnList has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Method StartSqlOnly has a Cognitive Complexity of 49 (exceeds 20 allowed). Consider refactoring.
                            Open

                                    public async Task<bool> StartSqlOnly(string connectionString)
                                    {
                                        // SentrySdk.Init(options =>
                                        // {
                                        //     // A Sentry Data Source Name (DSN) is required.
                            Severity: Minor
                            Found in eFormCore/Core.cs - About 5 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 CheckListValues_Update_DoesUpdate has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    [Test]
                                    public async Task CheckListValues_Update_DoesUpdate()
                                    {
                                        //Arrange
                            
                            
                            Severity: Major
                            Found in eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs - About 5 hrs to fix

                              Method Questions_Update_DoesUpdate has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Method SaveAnswer has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        private async Task SaveAnswer(JToken subItem, int questionSetId)
                                        {
                                            Log.LogStandard("Core.SaveAnswer", $"called {DateTime.UtcNow}");
                                            var settings = new JsonSerializerSettings { Error = (se, ev) => { ev.ErrorContext.Handled = true; } };
                                            await using (var db = DbContextHelper.GetDbContext())
                                Severity: Major
                                Found in eFormCore/Core.cs - About 5 hrs to fix

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

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

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

                                            [Test]
                                            public async Task CheckListValues_Delete_DoesSetWorkflowStateToRemoved()
                                            {
                                                //Arrange
                                    
                                    
                                    Severity: Major
                                    Found in eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs - About 5 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language