microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

        [Test]
        public async Task Core_eFormSimpleTimerFormFromXML_ReturnseMainElement()
        {
            string xmlstring = @"
                <?xml version='1.0' encoding='UTF-8'?>
eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 251..336
eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 1880..1960

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

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

        [Test]
        public async Task Core_eForm_SimpleDateFormFromXML_ReturnseMainElement()
        {
            // Arrange
            string xmlstring = @"
eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 1880..1960
eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 1962..2042

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

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 CheckListsUTest.cs has 602 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: Major
Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs - About 1 day to fix

    Method Core_Case_CaseToJasperXml_ReturnsPath has 261 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

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

                          case Constants.Constants.FieldTypes.SaveButton:
                              SaveButton saveButton = (SaveButton)dataItem;
                              // field.DefaultValue = saveButton.Value;
                              await field.Create(db).ConfigureAwait(false);
                              fieldTranslation = new FieldTranslation
      Severity: Major
      Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 1 day to fix
      eFormCore/Infrastructure/SqlController.cs on lines 6499..6554

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

      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

                          case Constants.Constants.FieldTypes.ShowPdf:
                              ShowPdf showPdf = (ShowPdf)dataItem;
                              await field.Create(db).ConfigureAwait(false);
                              // field.DefaultValue = showPdf.Value;
                              fieldTranslation = new FieldTranslation
      Severity: Major
      Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 1 day to fix
      eFormCore/Infrastructure/SqlController.cs on lines 6442..6497

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

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

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

        Method Core_Case_GetHttpServerAddress_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method Core_Case_GetJasperPath_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method Core_Case_GetPicturePath_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method CaseReadAll has 256 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public async Task<CaseList> CaseReadAll(int? templatId, DateTime? start, DateTime? end, string workflowState,
                          string searchKey, bool descendingSort, string sortParameter, int offSet, int pageSize,
                          TimeZoneInfo timeZoneInfo)
                      {
                          string methodName = "SqlController.CaseReadAll";
              Severity: Major
              Found in eFormCore/Infrastructure/SqlController.cs - About 1 day to fix

                Method Core_Case_CasesToCsv_returnsPathAndName has 254 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method FieldValueReadAllValues has 253 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public async Task<List<List<KeyValuePair>>> FieldValueReadAllValues(int fieldId, List<int> caseIds,
                              string customPathForUploadedData, string decimalSeparator, string thousandSeparator, Language language,
                              bool gpsCoordinates)
                          {
                              string methodName = "SqlController.FieldValueReadAllValues";
                  Severity: Major
                  Found in eFormCore/Infrastructure/SqlController.cs - About 1 day to fix

                    Method Fields_Delete_DoesSetWorkflowStateToRemoved has 252 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            [Test]
                            public async Task Fields_Delete_DoesSetWorkflowStateToRemoved()
                            {
                                short shortMinValue = Int16.MinValue;
                                short shortmaxValue = Int16.MaxValue;
                    Severity: Major
                    Found in eFormSDK.CheckLists.Tests/FieldsUTest.cs - About 1 day to fix

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

                              protected override void Up(MigrationBuilder migrationBuilder)
                              {
                                  migrationBuilder.DropTable(
                                      name: "LogExceptions");
                      
                      
                      Severity: Major
                      Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs - About 1 day to fix

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

                                [Test]
                                public async Task Core_eForm_SimplePictureFormFromXML_ReturnseMainElement()
                                {
                                    // Arrange
                                    string xmlstring = @"
                        eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 2044..2122

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

                        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 Core_eFormSimpleSaveButtonFormFromXML_ReturnseMainElement()
                                {
                                    string xmlstring = @"
                                        <?xml version='1.0' encoding='UTF-8'?>
                        eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs on lines 171..249

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

                        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

                                    modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.cases", b =>
                                        {
                                            b.Property<int>("Id")
                                                .ValueGeneratedOnAdd()
                                                .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
                        eFormCore/Migrations/20190515064952_FixingNamingForFieldValues.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190531092007_AddingMissingAIonLogs.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190711053344_AddingJasperDocxEnabledAttributesToCheckList.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190806093044_AddingSiteGroups.Designer.cs on lines 253..325
                        eFormCore/Migrations/20190828054730_AddingNewVersionClasses.Designer.cs on lines 277..349

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

                        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

                                    modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.cases", b =>
                                        {
                                            b.Property<int>("Id")
                                                .ValueGeneratedOnAdd()
                                                .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
                        eFormCore/Migrations/20190515064952_FixingNamingForFieldValues.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190531092007_AddingMissingAIonLogs.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190711053344_AddingJasperDocxEnabledAttributesToCheckList.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190806093044_AddingSiteGroups.Designer.cs on lines 253..325
                        eFormCore/Migrations/20190828074017_AddingMissingClasses.Designer.cs on lines 277..349

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

                        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

                                    modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.cases", b =>
                                        {
                                            b.Property<int>("Id")
                                                .ValueGeneratedOnAdd()
                                                .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
                        eFormCore/Migrations/20190515064952_FixingNamingForFieldValues.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190531092007_AddingMissingAIonLogs.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190711053344_AddingJasperDocxEnabledAttributesToCheckList.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190828054730_AddingNewVersionClasses.Designer.cs on lines 277..349
                        eFormCore/Migrations/20190828074017_AddingMissingClasses.Designer.cs on lines 277..349

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

                        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