microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.options", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
eFormCore/Migrations/20200222140656_AddinDisplayIndexToOptions.Designer.cs on lines 1460..1496
eFormCore/Migrations/20200224092512_AddingMoreAttributesToUnits.Designer.cs on lines 1460..1496

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

Method Core_AdvancedTemplate_Advanced_TemplateUpdateFieldIdsForColumns_ChangesIdsForColumns has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        [Test]
        public async Task Core_AdvancedTemplate_Advanced_TemplateUpdateFieldIdsForColumns_ChangesIdsForColumns()
        {
            // Arrange

Severity: Major
Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs - About 4 hrs to fix

    Method SQL_PostCase_CaseReadByMUId_Returns_ReturnCase has 119 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public async Task SQL_PostCase_CaseReadByMUId_Returns_ReturnCase()
            {
                // Arrance
    
    
    Severity: Major
    Found in eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs - About 4 hrs to fix

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

              [Test]
              public async Task questionSet_Update_DoesUpdate_AllTrue()
              {
                  // Arrange
                  string name = Guid.NewGuid().ToString();
      Severity: Major
      Found in eFormSDK.Integration.Tests/SqlControllerTestQuestionSet.cs and 1 other location - About 4 hrs to fix
      eFormSDK.Integration.Tests/SqlControllerTestQuestionSet.cs on lines 268..299

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

              [Test]
              public async Task questionSet_Update_DoesUpdate_AllFalse()
              {
                  // Arrange
                  string name = Guid.NewGuid().ToString();
      Severity: Major
      Found in eFormSDK.Integration.Tests/SqlControllerTestQuestionSet.cs and 1 other location - About 4 hrs to fix
      eFormSDK.Integration.Tests/SqlControllerTestQuestionSet.cs on lines 300..330

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

      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

                  modelBuilder.Entity("eFormSqlController.entity_item_versions", b =>
                      {
                          b.Property<int>("id")
                              .ValueGeneratedOnAdd()
                              .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20190116110009_AddingOriginalId.Designer.cs on lines 582..617

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

      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

                  modelBuilder.Entity("eFormSqlController.entity_items", b =>
                  {
                      b.Property<int>("id")
                          .ValueGeneratedOnAdd()
                  .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
      eFormCore/Migrations/20180810124416_InitialCreate.Designer.cs on lines 545..580

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

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

              [Test]
              public async Task OptionTranslation_Update_DoesUpdate_WO_MicrotingUid()
              {
                  //Arrange
      
      
      Severity: Major
      Found in eFormSDK.InSight.Tests/OptionTranslationUTest.cs - About 4 hrs to fix

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

                    migrationBuilder.CreateTable(
                        name: "SiteGroupSiteVersions",
                        columns: table => new
                        {
                            Id = table.Column<int>(type: "int", nullable: false)
        Severity: Major
        Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs and 1 other location - About 4 hrs to fix
        eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 435..452

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

        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: "SiteGroupVersions",
                        columns: table => new
                        {
                            Id = table.Column<int>(type: "int", nullable: false)
        Severity: Major
        Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs and 1 other location - About 4 hrs to fix
        eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 416..433

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

        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

        File Language.cs has 362 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System.Linq;
        using System.Threading.Tasks;
        
        namespace Microting.eForm.Infrastructure.Data.Entities
        {
        Severity: Minor
        Found in eFormCore/Infrastructure/Data/Entities/Language.cs - About 4 hrs to fix

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

                      migrationBuilder.CreateTable(
                          name: "FieldOptionVersions",
                          columns: table => new
                          {
                              Id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs and 3 other locations - About 4 hrs to fix
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 105..124
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 219..238
          eFormCore/Migrations/20210407134630_AddingFolderTranslations.cs on lines 11..30

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

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

                      migrationBuilder.CreateTable(
                          name: "CheckListTranslationVersions",
                          columns: table => new
                          {
                              Id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs and 3 other locations - About 4 hrs to fix
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 172..191
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 219..238
          eFormCore/Migrations/20210407134630_AddingFolderTranslations.cs on lines 11..30

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

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

                      migrationBuilder.CreateTable(
                          name: "FolderTranslations",
                          columns: table => new
                          {
                              Id = table.Column<int>(nullable: false)
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 105..124
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 172..191
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 219..238

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

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

                      migrationBuilder.CreateTable(
                          name: "FieldTranslationVersions",
                          columns: table => new
                          {
                              Id = table.Column<int>(nullable: false)
          Severity: Major
          Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs and 3 other locations - About 4 hrs to fix
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 105..124
          eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 172..191
          eFormCore/Migrations/20210407134630_AddingFolderTranslations.cs on lines 11..30

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

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Method Core_eForm_SimpleFieldGroupsFormCreateInDB_ReturnseFormId has 116 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method SQL_Check_FieldValueRead_ReturnsAnswer has 116 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method CheckListValues_Create_DoesCreate has 116 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Test]
                      public async Task CheckListValues_Create_DoesCreate()
                      {
                          //Arrange
              
              
              Severity: Major
              Found in eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs - About 4 hrs to fix

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

                        protected override void Down(MigrationBuilder migrationBuilder)
                        {
                            migrationBuilder.DropForeignKey(
                                name: "FK_answer_value_versions_answer_values_answerValueId",
                                table: "answer_value_versions");
                Severity: Major
                Found in eFormCore/Migrations/20190319130214_AddingMissingForeignKeys.cs - About 4 hrs to fix

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

                              Case theCase = new Case
                              {
                                  Custom = Guid.NewGuid().ToString(),
                                  Status = rnd.Next(1, 255),
                                  Type = Guid.NewGuid().ToString(),
                  Severity: Major
                  Found in eFormSDK.CheckLists.Tests/FieldValuesUTest.cs and 8 other locations - About 4 hrs to fix
                  eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 113..136
                  eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 283..306
                  eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 519..542
                  eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 113..136
                  eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 254..277
                  eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 411..434
                  eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 393..416
                  eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 663..686

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

                  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