microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

        [Test]
        public async Task SQL_Notification_NewNotificationCreateCompletedForm_DoesStoreNotification()
        {
            // Arrance
            Random rnd = new Random();
eFormSDK.Integration.Base.SqlControllerTests/SqlControllerTestNotification.cs on lines 71..90

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

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

        [Test]
        public async Task SQL_Check_CheckListValueStatusRead_ReturnsCheckListValuesStatus()
        {
            // Arrance
            
Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestCheckListValue.cs - About 4 hrs to fix

    Method ClearDb has 101 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private async Task ClearDb()
            {
                Console.WriteLine($"{DateTime.Now} : ClearDb...");
                List<string> modelNames = new List<string>
                {
    Severity: Major
    Found in eFormSDK.Base.Tests/DbTestFixture.cs - About 4 hrs to fix

      Method Core_Case_CaseLookupMUId_Returns_ReturnCase has 100 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        File AnswersUTest.cs has 333 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using System.Collections.Generic;
        using System.Linq;
        using System.Threading.Tasks;
        using Microsoft.EntityFrameworkCore;
        Severity: Minor
        Found in eFormSDK.InSight.Tests/AnswersUTest.cs - About 4 hrs to fix

          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

          Method Questions_Delete_DoesSetWorkflowStateToRemoved has 98 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method CaseDelete has 97 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public async Task<bool> CaseDelete(int microtingUId)
                    {
                        string methodName = "Core.CaseDelete";
            
                        Log.LogVariable(methodName, nameof(microtingUId), microtingUId);
            Severity: Major
            Found in eFormCore/Core.cs - About 3 hrs to fix

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

                          migrationBuilder.CreateTable(
                              name: "SiteGroupSiteVersions",
                              columns: table => new
                              {
                                  Id = table.Column<int>(nullable: false)
              Severity: Major
              Found in eFormCore/Migrations/20190806093044_AddingSiteGroups.cs and 4 other locations - About 3 hrs to fix
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 139..156
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 329..346
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 66..83
              eFormCore/Migrations/20200116074236_AddingSiteTaggins.cs on lines 139..156

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

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

                          migrationBuilder.CreateTable(
                              name: "language_versions",
                              columns: table => new
                              {
                                  id = table.Column<int>(nullable: false)
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 329..346
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 47..64
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 66..83
              eFormCore/Migrations/20200116074236_AddingSiteTaggins.cs on lines 139..156

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

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

                          migrationBuilder.CreateTable(
                              name: "site_survey_configuraion_versions",
                              columns: table => new
                              {
                                  id = table.Column<int>(nullable: false)
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 139..156
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 47..64
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 66..83
              eFormCore/Migrations/20200116074236_AddingSiteTaggins.cs on lines 139..156

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

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

                          migrationBuilder.CreateTable(
                              name: "SiteTagVersions",
                              columns: table => new
                              {
                                  Id = table.Column<int>(nullable: false)
              Severity: Major
              Found in eFormCore/Migrations/20200116074236_AddingSiteTaggins.cs and 4 other locations - About 3 hrs to fix
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 139..156
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 329..346
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 47..64
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 66..83

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

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

                          migrationBuilder.CreateTable(
                              name: "SiteGroupVersions",
                              columns: table => new
                              {
                                  Id = table.Column<int>(nullable: false)
              Severity: Major
              Found in eFormCore/Migrations/20190806093044_AddingSiteGroups.cs and 4 other locations - About 3 hrs to fix
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 139..156
              eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 329..346
              eFormCore/Migrations/20190806093044_AddingSiteGroups.cs on lines 47..64
              eFormCore/Migrations/20200116074236_AddingSiteTaggins.cs on lines 139..156

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

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

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

                Method options_Update_DoesUpdate has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        [Test]
                        public async Task options_Update_DoesUpdate()
                        {        
                            // Arrange
                            #region QuestionSet
                Severity: Major
                Found in eFormSDK.Integration.Tests/SqlControllerTestOptions.cs - About 3 hrs to fix

                  Method GetElement has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private async Task<Element> GetElement(int elementId, Language language, bool includeDummyFields)
                          {
                              string methodName = "SqlController.GetElement";
                              try
                              {
                  Severity: Major
                  Found in eFormCore/Infrastructure/SqlController.cs - About 3 hrs to fix

                    File QuestionsUTest.cs has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    using System;
                    using System.Collections.Generic;
                    using System.Linq;
                    using System.Threading.Tasks;
                    using Microsoft.EntityFrameworkCore;
                    Severity: Minor
                    Found in eFormSDK.InSight.Tests/QuestionsUTest.cs - About 3 hrs to fix

                      Method ClearDb has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private async Task ClearDb()
                              {
                                  List<string> modelNames = new List<string>
                                  {
                                      "CaseVersions",
                      Severity: Major
                      Found in eFormSDK.Integration.CheckLists.CoreTests/DbTestFixture.cs - About 3 hrs to fix

                        Method ClearDb has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                private async Task ClearDb()
                                {
                                    List<string> modelNames = new List<string>
                                    {
                                        "CaseVersions",
                        Severity: Major
                        Found in eFormSDK.Integration.Base.SqlControllerTests/DbTestFixture.cs - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language