microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

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

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

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

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

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

        Method Core_Case_CasesToCsv_returnsPathAndName has 254 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method FieldValueReadAllValues has 253 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task<List<List<KeyValuePair>>> FieldValueReadAllValues(int fieldId, List<int> caseIds,
                      string customPathForUploadedData, string decimalSeparator, string thousandSeparator, Language language,
                      bool gpsCoordinates)
                  {
                      string methodName = "SqlController.FieldValueReadAllValues";
          Severity: Major
          Found in eFormCore/Infrastructure/SqlController.cs - About 1 day to fix

            Method Fields_Delete_DoesSetWorkflowStateToRemoved has 252 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

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

                      protected override void Up(MigrationBuilder migrationBuilder)
                      {
                          migrationBuilder.DropTable(
                              name: "LogExceptions");
              
              
              Severity: Major
              Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs - About 1 day to fix

                Class SqlControllerTestQuestion has 67 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    [TestFixture]
                    public class SqlControllerTestQuestion : DbTestFixture
                    {
                        #region create
                        [Test]
                Severity: Major
                Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs - About 1 day to fix

                  Method Checklists_Update_DoesUpdate has 245 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          [Test]
                          public async Task Checklists_Update_DoesUpdate()
                          {
                              //Arrange
                  
                  
                  Severity: Major
                  Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs - About 1 day to fix

                    Method SubChecks has 245 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      File SqlControllerTestQuestionSet.cs has 572 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/SqlControllerTestQuestionSet.cs - About 1 day to fix

                        Method GenerateDataSetFromCases has a Cognitive Complexity of 76 (exceeds 20 allowed). Consider refactoring.
                        Open

                                public async Task<List<List<string>>> GenerateDataSetFromCases(int? checkListId, DateTime? start, DateTime? end,
                                    string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                                    CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool includeCheckListText,
                                    bool gpsCoordinates)
                                {
                        Severity: Minor
                        Found in eFormCore/Core.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

                        Method FieldValues_Update_DoesUpdate has 239 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method Core_Case_CaseUpdateFieldValues has 239 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Method Core_Case_CaseUpdateFieldValues has 236 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              File CoreTestFolders.cs has 551 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.Base.CoreTests/CoreTestFolders.cs - About 1 day to fix

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

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

                                          protected override void Up(MigrationBuilder migrationBuilder)
                                          {
                                              migrationBuilder.RenameTable(
                                                  name: "answer_value_versions",
                                                  null,
                                  Severity: Major
                                  Found in eFormCore/Migrations/20201222125152_HugheTableRenaming.cs - About 1 day to fix

                                    File CasesUTest.cs has 542 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/CasesUTest.cs - About 1 day to fix

                                      Method FieldValues_Delete_DoesSetWorkflowStateToRemoved has 223 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

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