microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211014105943_CLAttributes.Designer.cs on lines 1159..1234
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.ExtraFieldValue", b =>
                    {
                        b.Property<int>("Id")
                            .ValueGeneratedOnAdd()
                            .HasColumnType("int");
    eFormCore/Migrations/20210405153325_AddingExtraFieldValues.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210407134630_AddingFolderTranslations.Designer.cs on lines 1129..1204
    eFormCore/Migrations/20210609072417_AddingLinkingOfSitesAndEntities.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.Designer.cs on lines 1141..1216
    eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.Designer.cs on lines 1165..1240
    eFormCore/Migrations/20211116085744_AddingDoneAtEditable.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20220207094729_AddingIsLockedToSiteUnitWorkers.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.Designer.cs on lines 1185..1260
    eFormCore/Migrations/20221129082337_AddingReceivedByServerAtToCases.Designer.cs on lines 1191..1266
    eFormCore/Migrations/20230506062507_AddingInitialsToWorkers.Designer.cs on lines 1192..1267
    eFormCore/Migrations/20230607084834_AddingOriginalFileLocationToUploadedData.Designer.cs on lines 1192..1267

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

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

      Method Core_Case_CaseUpdate_ReturnsTrue has 272 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method SQL_EntityGroup_EntityGroupDelete_DeletesEntityGroup has 266 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method SQL_EntityGroup_EntityGroupUpdateName_UpdatesEnityGroupName has 266 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method SQL_EntityGroup_EntityGroupUpdate_UpdatesEntityGroup has 266 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method CaseUpdateFieldValues has a Cognitive Complexity of 82 (exceeds 20 allowed). Consider refactoring.
              Open

                      public async Task<bool> CaseUpdateFieldValues(int caseId, Language language)
                      {
                          string methodName = "SqlController.CaseUpdateFieldValues";
                          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

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

                      [Test]
                      public async Task Core_eFormSimpleCheckBoxFormFromXML_ReturnseMainElement()
                      {
                          string xmlstring = @"
                              <?xml version='1.0' encoding='UTF-8'?>
              eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 251..336
              eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 1962..2042

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

              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