microting/eform-sdk-dotnet

View on GitHub
eFormCore/Migrations/20180810124416_InitialCreate.cs

Summary

Maintainability
F
2 wks
Test Coverage

Method Up has 1026 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        protected override void Up(MigrationBuilder migrationBuilder)
        {
            //Setup for SQL Server Provider
           
            string autoIDGenStrategy = "SqlServer:ValueGenerationStrategy";
Severity: Major
Found in eFormCore/Migrations/20180810124416_InitialCreate.cs - About 5 days to fix

    File 20180810124416_InitialCreate.cs has 1181 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System;
    using System.Collections.Generic;
    using Microsoft.EntityFrameworkCore.Metadata;
    using Microsoft.EntityFrameworkCore.Migrations;
    
    
    Severity: Major
    Found in eFormCore/Migrations/20180810124416_InitialCreate.cs - About 3 days to fix

      Method Down has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              protected override void Down(MigrationBuilder migrationBuilder)
              {
                  migrationBuilder.DropTable(
                      name: "case_versions");
      
      
      Severity: Major
      Found in eFormCore/Migrations/20180810124416_InitialCreate.cs - About 2 hrs to fix

        Method SetAutoIncrementforTables has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private void SetAutoIncrementforTables(MigrationBuilder migrationBuilder)
                {
                    List<string> modelNames = new List<string>();
                    modelNames.Add("case_versions");
                    modelNames.Add("cases");
        Severity: Major
        Found in eFormCore/Migrations/20180810124416_InitialCreate.cs - About 2 hrs to fix

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

                      migrationBuilder.CreateTable(
                          name: "site_workers",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 5 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 944..973

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

          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

                      migrationBuilder.CreateTable(
                          name: "taggings",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 5 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 754..783

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

          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

                      migrationBuilder.CreateTable(
                          name: "tagging_versions",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 4 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 461..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 284.

          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

                      migrationBuilder.CreateTable(
                          name: "site_worker_versions",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 4 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 518..536

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

          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

                      migrationBuilder.CreateTable(
                          name: "tag_versions",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 3 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 442..459

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

          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

                      migrationBuilder.CreateTable(
                          name: "site_versions",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 3 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 499..516

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

          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

                      migrationBuilder.CreateTable(
                          name: "sites",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 3 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 538..554

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

          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

                      migrationBuilder.CreateTable(
                          name: "tags",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 3 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 481..497

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

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

                          constraints: table =>
                          {
                              table.PrimaryKey("PK_cases", x => x.id);
                              table.ForeignKey(
                                  name: "FK_cases_check_lists_check_list_id",
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 2 other locations - About 3 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 1000..1027
          eFormCore/Migrations/20201222125152_HugheTableRenaming.cs on lines 1818..1845

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

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

                          constraints: table =>
                          {
                              table.PrimaryKey("PK_field_values", x => x.id);
                              table.ForeignKey(
                                  name: "FK_field_values_check_lists_check_list_id",
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 2 other locations - About 3 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 817..844
          eFormCore/Migrations/20201222125152_HugheTableRenaming.cs on lines 1818..1845

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

          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

                      migrationBuilder.CreateTable(
                          name: "log_exceptions",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 2 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 392..406

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

          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

                      migrationBuilder.CreateTable(
                          name: "logs",
                          columns: table => new
                          {
                              id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 1 other location - About 2 hrs to fix
          eFormCore/Migrations/20180810124416_InitialCreate.cs on lines 376..390

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

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

                          constraints: table =>
                          {
                              table.PrimaryKey("PK_fields", x => x.id);
                              table.ForeignKey(
                                  name: "FK_fields_check_lists_check_list_id",
          Severity: Major
          Found in eFormCore/Migrations/20180810124416_InitialCreate.cs and 2 other locations - About 2 hrs to fix
          eFormCore/Migrations/20201222125152_HugheTableRenaming.cs on lines 884..905
          eFormCore/Migrations/20201222125152_HugheTableRenaming.cs on lines 1712..1733

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

          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