microting/eform-sdk-dotnet

View on GitHub
eFormCore/Migrations/20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs

Summary

Maintainability
F
2 wks
Test Coverage

Method BuildTargetModel has 1778 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;

    File 20200122103229_ChangingValueToBeStringForAnswerValue.Designer.cs has 1794 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;

      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/20200120093951_CleanupInSight.Designer.cs on lines 167..215
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 167..215
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 167..215
      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/20200120093951_CleanupInSight.Designer.cs on lines 125..165
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 125..165
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 125..165
      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/20200120093951_CleanupInSight.Designer.cs on lines 2138..2176
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2312..2350
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2324..2362
      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/20200120093951_CleanupInSight.Designer.cs on lines 2178..2216
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2352..2390
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2364..2402
      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/20200120093951_CleanupInSight.Designer.cs on lines 1322..1358
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 1436..1472
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 1444..1480

      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/20200120093951_CleanupInSight.Designer.cs on lines 1360..1394
      eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 1474..1508
      eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 1482..1516

      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

      There are no issues that match your filters.

      Category
      Status