microting/eform-sdk-dotnet

View on GitHub

Showing 2,526 of 2,542 total issues

Similar blocks of code found in 28 locations. Consider refactoring.
Open

                [Test]
                public async Task question_Update_DoesUpdate_ValidDisplayTrue()
                {
                    // Arrange
                    string name = Guid.NewGuid().ToString();
Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs and 27 other locations - About 2 days to fix
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1912..1996
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1998..2083
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2087..2171
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2259..2343
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2345..2429
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2430..2514
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2515..2599
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2600..2684
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2685..2769
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2770..2854
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2855..2939
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2940..3024
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3025..3109
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3110..3194
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3199..3284
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3286..3371
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3373..3458
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3460..3545
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3546..3631
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3632..3717
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3718..3803
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3804..3889
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3890..3975
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3976..4061
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4062..4147
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4148..4234
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4235..4319

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 1165.

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

Similar blocks of code found in 28 locations. Consider refactoring.
Open

            [Test]
            public async Task question_Update_DoesUpdate_BackButtonEnabledTrue_QSFalse()
            {
                // Arrange
                string name = Guid.NewGuid().ToString();
Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs and 27 other locations - About 2 days to fix
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1912..1996
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1998..2083
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2087..2171
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2173..2257
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2259..2343
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2345..2429
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2430..2514
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2515..2599
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2600..2684
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2685..2769
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2770..2854
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2855..2939
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2940..3024
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3025..3109
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3110..3194
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3199..3284
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3286..3371
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3460..3545
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3546..3631
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3632..3717
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3718..3803
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3804..3889
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3890..3975
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3976..4061
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4062..4147
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4148..4234
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4235..4319

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 1165.

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

Similar blocks of code found in 28 locations. Consider refactoring.
Open

                            [Test]
            public async Task question_Update_DoesUpdate_PrioritisedImageTrue_QSFalse()
            {
                // Arrange
                string name = Guid.NewGuid().ToString();
Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs and 27 other locations - About 2 days to fix
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1912..1996
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1998..2083
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2087..2171
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2173..2257
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2259..2343
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2345..2429
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2430..2514
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2515..2599
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2600..2684
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2685..2769
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2770..2854
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2855..2939
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2940..3024
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3025..3109
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3110..3194
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3199..3284
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3286..3371
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3373..3458
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3460..3545
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3546..3631
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3632..3717
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3804..3889
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3890..3975
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3976..4061
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4062..4147
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4148..4234
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4235..4319

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 1165.

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

Similar blocks of code found in 28 locations. Consider refactoring.
Open

                [Test]
                public async Task question_Update_DoesUpdate_ValidDisplayBackButtonEnabledImageTrue()
                {
                    // Arrange
                    string name = Guid.NewGuid().ToString();
Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs and 27 other locations - About 2 days to fix
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1912..1996
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 1998..2083
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2087..2171
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2173..2257
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2259..2343
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2345..2429
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2430..2514
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2515..2599
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2600..2684
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2685..2769
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2770..2854
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2855..2939
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 2940..3024
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3025..3109
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3199..3284
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3286..3371
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3373..3458
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3460..3545
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3546..3631
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3632..3717
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3718..3803
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3804..3889
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3890..3975
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 3976..4061
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4062..4147
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4148..4234
eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs on lines 4235..4319

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 1165.

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 Core_eForm_OptionsWithMicrotingFormCreateInDB_ReturnseFormId has 472 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        [Test]
        public async Task Core_eForm_OptionsWithMicrotingFormCreateInDB_ReturnseFormId()
        {
            // Arrange
            string xmlstring = @"
Severity: Major
Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormCreateInDB.cs - About 2 days to fix

    Method CaseReadAll has a Cognitive Complexity of 131 (exceeds 20 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: 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

    File CoreTestCase.cs has 945 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.Case.CoreTests/CoreTestCase.cs - About 2 days to fix

      Method Core_eForm_OptionsWithMicrotingFormFromXML_ReturnseMainElement has 452 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method MoveTranslations has a Cognitive Complexity of 126 (exceeds 20 allowed). Consider refactoring.
        Open

                public static async Task MoveTranslations(MicrotingDbContext dbContext)
                {
                    try
                    {
                        List<Field> fields = await dbContext.Fields.ToListAsync();
        Severity: Minor
        Found in eFormCore/Infrastructure/Data/Entities/Field.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 DocxToPdf has a Cognitive Complexity of 125 (exceeds 20 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: Minor
        Found in eFormCore/Core.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

        File SqlControllerTestUnit.cs has 894 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/SqlControllerTestUnit.cs - About 2 days to fix

          File Http.cs has 893 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          using System;
          using System.CodeDom.Compiler;
          using System.IO;
          using System.Net;
          using System.Net.Http;
          Severity: Major
          Found in eFormCore/Communication/Http.cs - About 2 days to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    [Test]
                    public async Task Core_Case_CaseReadByCaseId_Returns_cDto()
                    {
                        // Arrance
                        #region Arrance
            Severity: Major
            Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 1 other location - About 2 days to fix
            eFormSDK.Integration.Tests/CoreTestCase.cs on lines 2281..2388

            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 1057.

            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

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    [Test]
                    public async Task Core_Case_CaseLookupCaseId_Returns_cDto()
                    {
                        // Arrance
                        #region Arrance
            Severity: Major
            Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 1 other location - About 2 days to fix
            eFormSDK.Integration.Tests/CoreTestCase.cs on lines 372..479

            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 1057.

            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 3 locations. Consider refactoring.
            Open

                        modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.Case", b =>
                            {
                                b.Property<int>("Id")
                                    .ValueGeneratedOnAdd()
                                    .HasColumnType("int");
            eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 234..345
            eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 235..346

            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 1001.

            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 3 locations. Consider refactoring.
            Open

                        modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.Case", b =>
                            {
                                b.Property<int>("Id")
                                    .ValueGeneratedOnAdd()
                                    .HasColumnType("int");
            eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 234..345
            eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 235..346

            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 1001.

            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 3 locations. Consider refactoring.
            Open

                        modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.Case", b =>
                            {
                                b.Property<int>("Id")
                                    .ValueGeneratedOnAdd()
                                    .HasColumnType("int");
            eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 235..346
            eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 235..346

            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 1001.

            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 CreateDataItem has a Cognitive Complexity of 114 (exceeds 20 allowed). Consider refactoring.
            Open

                    private async Task CreateDataItem(int? parentFieldId, int elementId, DataItem dataItem, Language language)
                    {
                        string methodName = "SqlController.CreateDataItem";
                        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 CoreTestCaseReadAllShort.cs has 825 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.Case.CoreTests/CoreTestCaseReadAllShort.cs - About 1 day to fix

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

                          modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.Case", b =>
                              {
                                  b.Property<int>("Id")
                                      .ValueGeneratedOnAdd()
                                      .HasColumnType("int");
              eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 234..342
              eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 234..342

              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 972.

              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