microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

            UploadedData uploadedData = new UploadedData
            {
                Checksum = Guid.NewGuid().ToString(),
                Extension = Guid.NewGuid().ToString(),
                Local = (short)rnd.Next(shortMinValue, shortmaxValue),
Severity: Major
Found in eFormSDK.CheckLists.Tests/FieldValuesUTest.cs and 5 other locations - About 2 hrs to fix
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 188..200
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 689..701
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 49..61
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 122..134
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 233..245

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

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

            UploadedData uploadedData = new UploadedData
            {
                Checksum = Guid.NewGuid().ToString(),
                Extension = Guid.NewGuid().ToString(),
                Local = (short)rnd.Next(minValue, maxValue),
Severity: Major
Found in eFormSDK.CheckLists.Tests/UploadedDataUTest.cs and 5 other locations - About 2 hrs to fix
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 188..200
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 419..431
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 689..701
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 122..134
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 233..245

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

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

            UploadedData uploadedData = new UploadedData
            {
                Checksum = Guid.NewGuid().ToString(),
                Extension = Guid.NewGuid().ToString(),
                Local = (short)rnd.Next(shortMinValue, shortmaxValue),
Severity: Major
Found in eFormSDK.CheckLists.Tests/FieldValuesUTest.cs and 5 other locations - About 2 hrs to fix
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 188..200
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 419..431
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 49..61
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 122..134
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 233..245

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

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

            UploadedData uploadedData = new UploadedData
            {
                Checksum = Guid.NewGuid().ToString(),
                Extension = Guid.NewGuid().ToString(),
                Local = (short)rnd.Next(minValue, maxValue),
Severity: Major
Found in eFormSDK.CheckLists.Tests/UploadedDataUTest.cs and 5 other locations - About 2 hrs to fix
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 188..200
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 419..431
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 689..701
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 49..61
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 233..245

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

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

            UploadedData uploadedData = new UploadedData
            {
                Checksum = Guid.NewGuid().ToString(),
                Extension = Guid.NewGuid().ToString(),
                Local = (short)rnd.Next(shortMinValue, shortmaxValue),
Severity: Major
Found in eFormSDK.CheckLists.Tests/FieldValuesUTest.cs and 5 other locations - About 2 hrs to fix
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 419..431
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 689..701
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 49..61
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 122..134
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 233..245

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

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

            UploadedData uploadedData = new UploadedData
            {
                Checksum = Guid.NewGuid().ToString(),
                Extension = Guid.NewGuid().ToString(),
                Local = (short)rnd.Next(minValue, maxValue),
Severity: Major
Found in eFormSDK.CheckLists.Tests/UploadedDataUTest.cs and 5 other locations - About 2 hrs to fix
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 188..200
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 419..431
eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 689..701
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 49..61
eFormSDK.CheckLists.Tests/UploadedDataUTest.cs on lines 122..134

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

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

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

Severity: Major
Found in eFormSDK.Integration.Base.SqlControllerTests/SqlControllerTestUnit.cs - About 2 hrs to fix

    Method SQL_Unit_UnitUpdate_UpdatesUnit has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public async Task SQL_Unit_UnitUpdate_UpdatesUnit()
            {
                // Arrance
    
    
    Severity: Major
    Found in eFormSDK.Integration.Base.SqlControllerTests/SqlControllerTestUnit.cs - About 2 hrs to fix

      Method Core_Case_CaseReadFirstId has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method Core_Case_CaseReadByCaseId_Returns_cDto has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method Core_Case_CaseLookupCaseUId_Returns_lstDto has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method Core_Case_CaseLookupCaseId_Returns_cDto has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method Up has 58 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/20190408081151_AddingFolders.cs - About 2 hrs to fix

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

                        protected override void Down(MigrationBuilder migrationBuilder)
                        {
                            migrationBuilder.DropForeignKey(
                                name: "FK_LanguageQuestionSetVersions_LanguageQuestionSets_LanguageQue~",
                                table: "LanguageQuestionSetVersions");
                Severity: Major
                Found in eFormCore/Migrations/20201116164405_AddingDescriptionToEntityGroup.cs - About 2 hrs to fix

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

                  using Microsoft.EntityFrameworkCore.Migrations;
                  
                  namespace Microting.eForm.Migrations
                  {
                      public partial class AddingIsArchivedToCases : Migration
                  eFormCore/Migrations/20221016081344_AddingIsActiveToLanguage.cs on lines 1..37

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

                  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

                  using Microsoft.EntityFrameworkCore.Migrations;
                  
                  #nullable disable
                  
                  namespace Microting.eForm.Migrations
                  eFormCore/Migrations/20211108111024_AddingIsArchivedToCases.cs on lines 1..36

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

                  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

                                          var singleSelectFieldOptions =
                                              await db.FieldOptions.Where(x => x.FieldId == matchField.Id)
                                                  .Join(db.FieldOptionTranslations,
                                                      option => option.Id,
                                                      translation => translation.FieldOptionId,
                  Severity: Major
                  Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 2 hrs to fix
                  eFormCore/Infrastructure/SqlController.cs on lines 2566..2584

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

                  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

                                          var multiSelectFieldOptions =
                                              await db.FieldOptions.Where(x => x.FieldId == matchField.Id)
                                                  .Join(db.FieldOptionTranslations,
                                                      option => option.Id,
                                                      translation => translation.FieldOptionId,
                  Severity: Major
                  Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 2 hrs to fix
                  eFormCore/Infrastructure/SqlController.cs on lines 2537..2555

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

                  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 SqlControllerTestWorker.cs has 262 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  using System;
                  using System.IO;
                  using System.Linq;
                  using System.Reflection;
                  using System.Threading.Tasks;

                    Method SQL_Site_SimpleSiteGetAll_DoesReturnSiteList has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            [Test]
                            public async Task SQL_Site_SimpleSiteGetAll_DoesReturnSiteList()
                            {
                                // Arrance
                    
                    
                    Severity: Major
                    Found in eFormSDK.Integration.Base.SqlControllerTests/SqlControllerTestSite.cs - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language