microting/eform-sdk-dotnet

View on GitHub
eFormCore/Migrations/20200120093951_CleanupInSight.Designer.cs

Summary

Maintainability
F
2 wks
Test Coverage

Method BuildTargetModel has 1612 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            string autoIDGenStrategy = "SqlServer:ValueGenerationStrategy";
            object autoIDGenStrategyValue = MySqlValueGenerationStrategy.IdentityColumn;
Severity: Major
Found in eFormCore/Migrations/20200120093951_CleanupInSight.Designer.cs - About 1 wk to fix

    File 20200120093951_CleanupInSight.Designer.cs has 1645 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;
    Severity: Major
    Found in eFormCore/Migrations/20200120093951_CleanupInSight.Designer.cs - About 4 days to fix

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

                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answers", b =>
                      {
                          b.Property<int>("Id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 167..215
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 167..215
      eFormCore/Migrations/20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs on lines 143..191
      eFormCore/Migrations/20200222140656_AddinDisplayIndexToOptions.Designer.cs on lines 143..191
      eFormCore/Migrations/20200224084023_AddingAttributesToUnits.Designer.cs on lines 143..191
      eFormCore/Migrations/20200224092512_AddingMoreAttributesToUnits.Designer.cs on lines 143..191
      eFormCore/Migrations/20200226182616_MakingNextQuestionIdNullable.Designer.cs on lines 143..191

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

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

                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answer_versions", b =>
                      {
                          b.Property<int>("Id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 125..165
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 125..165
      eFormCore/Migrations/20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs on lines 101..141
      eFormCore/Migrations/20200222140656_AddinDisplayIndexToOptions.Designer.cs on lines 101..141
      eFormCore/Migrations/20200224084023_AddingAttributesToUnits.Designer.cs on lines 101..141
      eFormCore/Migrations/20200224092512_AddingMoreAttributesToUnits.Designer.cs on lines 101..141
      eFormCore/Migrations/20200226182616_MakingNextQuestionIdNullable.Designer.cs on lines 101..141

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

      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.unit_versions", b =>
                      {
                          b.Property<int>("Id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20200116074236_AddingSiteTaggins.Designer.cs on lines 2110..2148
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2312..2350
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2324..2362
      eFormCore/Migrations/20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs on lines 2302..2340
      eFormCore/Migrations/20200222140656_AddinDisplayIndexToOptions.Designer.cs on lines 2306..2344

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

      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.units", b =>
                      {
                          b.Property<int>("Id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20200116074236_AddingSiteTaggins.Designer.cs on lines 2150..2188
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2352..2390
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2364..2402
      eFormCore/Migrations/20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs on lines 2342..2380
      eFormCore/Migrations/20200222140656_AddinDisplayIndexToOptions.Designer.cs on lines 2346..2384

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

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

                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.option_versions", b =>
                      {
                          b.Property<int>("Id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 1436..1472
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 1444..1480
      eFormCore/Migrations/20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs on lines 1420..1456

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

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

                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.options", b =>
                      {
                          b.Property<int>("Id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 1474..1508
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 1482..1516
      eFormCore/Migrations/20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs on lines 1458..1492

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

      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.survey_configurations", b =>
                      {
                          b.Property<int>("Id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2168..2200
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2180..2212

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

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

                  modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_tags", b =>
                      {
                          b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                              .WithMany()
                              .HasForeignKey("SiteId");
      Severity: Major
      Found in eFormCore/Migrations/20200120093951_CleanupInSight.Designer.cs and 3 other locations - About 55 mins to fix
      eFormCore/Migrations/20200116074236_AddingSiteTaggins.Designer.cs on lines 2569..2578
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2826..2835
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2838..2847

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

      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

      There are no issues that match your filters.

      Category
      Status