microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

        [Test]
        public async Task SQL_Site_SimpleSiteGetAll_DoesReturnSiteList()
        {


Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestSite.cs - About 4 hrs to fix

    Method Answer_update_DoesUpdate has 111 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public async Task Answer_update_DoesUpdate()
            {
                Random rnd = new Random();
    
    
    Severity: Major
    Found in eFormSDK.InSight.Tests/AnswersUTest.cs - About 4 hrs to fix

      Method TemplateUploadData has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring.
      Open

              public async Task<MainElement> TemplateUploadData(MainElement mainElement)
              {
                  if (mainElement == null)
                      throw new ArgumentNullException(nameof(mainElement), "mainElement not allowed to be null");
      
      
      Severity: Minor
      Found in eFormCore/Core.cs - About 4 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method Core_eForm_SimpleFieldGroupsFormFromXML_ReturnseMainElement has 110 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method Up has 110 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/20190806093044_AddingSiteGroups.cs - About 4 hrs to fix

          Method QuestionTranslation_Update_DoesUpdate_W_MicrotingUID_RemovesUid has 110 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [Test]
                  public async Task QuestionTranslation_Update_DoesUpdate_W_MicrotingUID_RemovesUid()
                  {
                      Random rnd = new Random();
          
          
          Severity: Major
          Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 4 hrs to fix

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

                            columns: table => new
                            {
                                Id = table.Column<int>(type: "int", nullable: false)
                                    .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                                CheckListId = table.Column<int>(type: "int", nullable: true),
            Severity: Major
            Found in eFormCore/Migrations/20201222125152_HugheTableRenaming.cs and 1 other location - About 4 hrs to fix
            eFormCore/Migrations/20201225165255_FixingBrokenTableNames.cs on lines 40..52

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

            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

                            columns: table => new
                            {
                                Id = table.Column<int>(type: "int", nullable: false)
                                    .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                                CheckListId = table.Column<int>(type: "int", nullable: false),
            eFormCore/Migrations/20201222125152_HugheTableRenaming.cs on lines 1539..1551

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

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

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

              Method SQL_Site_SiteReadSimple_ReadsSite has 108 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID_AddsUID has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        [Test]
                        public async Task QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID_AddsUID()
                        {
                            Random rnd = new Random();
                
                
                Severity: Major
                Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 4 hrs to fix

                  Method QuestionTranslation_Update_DoesUpdate_W_MicrotingUID has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          [Test]
                          public async Task QuestionTranslation_Update_DoesUpdate_W_MicrotingUID()
                          {
                              Random rnd = new Random();
                  
                  
                  Severity: Major
                  Found in eFormSDK.InSight.Tests/QuestionTranslationUTest.cs - About 4 hrs to fix

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

                                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", b =>
                                    {
                                        b.Property<int>("Id")
                                            .ValueGeneratedOnAdd()
                                            .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
                    eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2168..2200
                    eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2180..2212

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

                    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

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

                                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", b =>
                                    {
                                        b.Property<int>("Id")
                                            .ValueGeneratedOnAdd()
                                            .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
                    eFormCore/Migrations/20200120093951_CleanupInSight.Designer.cs on lines 1994..2026
                    eFormCore/Migrations/20200120164857_AddingTranslationsToInSight.Designer.cs on lines 2168..2200

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

                    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

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

                                modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", b =>
                                    {
                                        b.Property<int>("Id")
                                            .ValueGeneratedOnAdd()
                                            .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);
                    eFormCore/Migrations/20200120093951_CleanupInSight.Designer.cs on lines 1994..2026
                    eFormCore/Migrations/20200120171433_AddingMicrotingUidToInSight.Designer.cs on lines 2180..2212

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

                    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_EntitySearchItemCreateExistingRemovedItem_ChangesWorkflowStateToCreated()
                            {
                                // Arrance
                                EntityGroup eG1 = await testHelpers.CreateEntityGroup("microtingUIdC1", "EntityGroup1",
                    Severity: Major
                    Found in eFormSDK.Integration.Base.CoreTests/CoreTestEntity.cs and 1 other location - About 4 hrs to fix
                    eFormSDK.Integration.Base.CoreTests/CoreTestEntity.cs on lines 2618..2636

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

                    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_EntitySelectItemCreateExistingRemovedItem_ChangesWorkflowStateToCreated()
                            {
                                // Arrance
                                EntityGroup eG1 = await testHelpers.CreateEntityGroup("microtingUIdC1", "EntityGroup1",
                    Severity: Major
                    Found in eFormSDK.Integration.Base.CoreTests/CoreTestEntity.cs and 1 other location - About 4 hrs to fix
                    eFormSDK.Integration.Base.CoreTests/CoreTestEntity.cs on lines 2564..2582

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

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

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

                      Method SQL_Site_SiteUpdate_UpdatesSite has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Method SQL_Site_SiteDelete_DeletesSite has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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