microting/eform-sdk-dotnet

View on GitHub

Showing 2,526 of 2,542 total issues

File CoreTestAdvanced.cs has 1402 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.CheckLists.CoreTests/CoreTestAdvanced.cs - About 3 days to fix

    Method Core_Case_CaseReadAll_Short has 733 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public async Task Core_Case_CaseReadAll_Short()
            {
                // Arrance
    
    
    Severity: Major
    Found in eFormSDK.Integration.Case.CoreTests/CoreTestCaseReadAllShort.cs - About 3 days to fix

      File 20190318122928_FixingNamingOfSurveyConfigurationSites.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 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
                    
                    

                      Identical blocks of code found in 6 locations. Consider refactoring.
                      Open

                                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckListVersion", b =>
                                      {
                                          b.Property<int>("Id")
                                              .ValueGeneratedOnAdd()
                                              .HasColumnType("int");
                      eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 846..999
                      eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 852..1005
                      eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 853..1006

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 1430.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 6 locations. Consider refactoring.
                      Open

                                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckListVersion", b =>
                                      {
                                          b.Property<int>("Id")
                                              .ValueGeneratedOnAdd()
                                              .HasColumnType("int");
                      eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 852..1005
                      eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 853..1006
                      eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 853..1006

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 1430.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 6 locations. Consider refactoring.
                      Open

                                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckListVersion", b =>
                                      {
                                          b.Property<int>("Id")
                                              .ValueGeneratedOnAdd()
                                              .HasColumnType("int");
                      eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 846..999
                      eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 846..999
                      eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 853..1006
                      eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 853..1006

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 1430.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 6 locations. Consider refactoring.
                      Open

                                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckListVersion", b =>
                                      {
                                          b.Property<int>("Id")
                                              .ValueGeneratedOnAdd()
                                              .HasColumnType("int");
                      eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 846..999
                      eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 852..1005
                      eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 853..1006

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 1430.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 6 locations. Consider refactoring.
                      Open

                                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckListVersion", b =>
                                      {
                                          b.Property<int>("Id")
                                              .ValueGeneratedOnAdd()
                                              .HasColumnType("int");
                      eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 846..999
                      eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 852..1005
                      eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 853..1006
                      eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 853..1006

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 1430.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 6 locations. Consider refactoring.
                      Open

                                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckListVersion", b =>
                                      {
                                          b.Property<int>("Id")
                                              .ValueGeneratedOnAdd()
                                              .HasColumnType("int");
                      eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 846..999
                      eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 852..1005
                      eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 853..1006
                      eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 853..1006

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 1430.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      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

                        Identical blocks of code found in 6 locations. Consider refactoring.
                        Open

                                    modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckList", b =>
                                        {
                                            b.Property<int>("Id")
                                                .ValueGeneratedOnAdd()
                                                .HasColumnType("int");
                        eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 445..597
                        eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 445..597
                        eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 445..597
                        eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 451..603
                        eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 452..604

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 1414.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 6 locations. Consider refactoring.
                        Open

                                    modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.CheckList", b =>
                                        {
                                            b.Property<int>("Id")
                                                .ValueGeneratedOnAdd()
                                                .HasColumnType("int");
                        eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 445..597
                        eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 445..597
                        eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 451..603
                        eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 452..604
                        eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 452..604

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 1414.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language