microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

Method CheckStatusByMicrotingUid has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private async Task<bool> CheckStatusByMicrotingUid(int microtingUid)
        {
            await using MicrotingDbContext dbContext = _core.DbContextHelper.GetDbContext();
            List<CaseDto> lstCase = new List<CaseDto>();

Severity: Major
Found in eFormCore/Handlers/EformCompletedHandler.cs - About 2 hrs to fix

    Method OptionTranslation_Create_DoesCreate_W_MicrotingUid has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

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

              public static class QuestionTypes
              {
                  public const string Smiley = "smiley";
                  public const string Smiley2 = "smiley2";
                  public const string Smiley3 = "smiley3";
      Severity: Major
      Found in eFormCore/Infrastructure/Constants/Constants.cs and 1 other location - About 2 hrs to fix
      eFormCore/Infrastructure/Constants/Constants.cs on lines 106..127

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

      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

              public static class FieldTypes
              {
                  public const string Audio = "Audio";
                  public const string Movie = "Movie";
                  public const string CheckBox = "CheckBox";
      Severity: Major
      Found in eFormCore/Infrastructure/Constants/Constants.cs and 1 other location - About 2 hrs to fix
      eFormCore/Infrastructure/Constants/Constants.cs on lines 173..195

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

      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

              public async Task<bool> Advanced_SiteWorkerDelete(int workerId)
              {
                  string methodName = "Core.Advanced_SiteWorkerDelete";
                  try
                  {
      Severity: Major
      Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
      eFormCore/Core.cs on lines 4939..4959

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

      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

              public async Task<bool> Advanced_UnitDelete(int unitId)
              {
                  string methodName = "Core.Advanced_UnitDelete";
                  try
                  {
      Severity: Major
      Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
      eFormCore/Core.cs on lines 4844..4864

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

      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

              public async Task<string> EntitySearchItemCreate(string entitySearchGroupId, string name, string description,
                  string id)
              {
                  _log.LogEverything("Communicator.EntitySearchItemCreate", "called");
                  _log.LogVariable("Communicator.EntitySearchItemCreate", nameof(entitySearchGroupId), entitySearchGroupId);
      Severity: Major
      Found in eFormCore/Communication/Communicator.cs and 1 other location - About 2 hrs to fix
      eFormCore/Communication/Communicator.cs on lines 735..752

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

      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

              public async Task<string> EntitySelectItemCreate(string entitySearchGroupId, string name, int displayOrder,
                  string ownUUID)
              {
                  _log.LogEverything("Communicator.EntitySelectItemCreate", "called");
                  _log.LogVariable("Communicator.EntitySelectItemCreate", nameof(entitySearchGroupId), entitySearchGroupId);
      Severity: Major
      Found in eFormCore/Communication/Communicator.cs and 1 other location - About 2 hrs to fix
      eFormCore/Communication/Communicator.cs on lines 688..705

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

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

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

        Method SQL_PostCase_CaseReadByCaseUId_Returns_lstDto has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method Core_eFormSimpleInfoboxFormCreateInDB_ReturnseFormId has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [Test]
                  public async Task Core_eFormSimpleInfoboxFormCreateInDB_ReturnseFormId()
                  {
                      string xmlstring = @"
                          <?xml version='1.0' encoding='UTF-8'?>
          Severity: Major
          Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormCreateInDB.cs - About 2 hrs to fix

            Method AddSignatureToParagraph has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    private static void AddSignatureToParagraph(WordprocessingDocument wordDoc, string relationshipId,
                        Int64Value cx, Int64Value cy, string tagToReplace)
                    {
                        WriteDebugConsoleLogEntry(new LogEntry(2, "ReportHelper", "AddImageToBody called"));
                        // Define the reference of the image.
            Severity: Major
            Found in eFormCore/Helpers/ReportHelper.cs - About 2 hrs to fix

              Method Advanced_SiteItemUpdate has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public async Task<bool> Advanced_SiteItemUpdate(int siteId, string name, string languageCode)
                      {
                          string methodName = "Core.Advanced_SiteItemUpdate";
                          try
                          {
              Severity: Major
              Found in eFormCore/Core.cs - About 2 hrs to fix

                Class CoreTesteFormCreateInDB has 24 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    [Parallelizable(ParallelScope.Fixtures)]
                    [TestFixture]
                    public class CoreTesteFormCreateInDB : DbTestFixture
                    {
                        private Core sut;
                Severity: Minor
                Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormCreateInDB.cs - About 2 hrs to fix

                  Class CoreTesteFormFromXML has 24 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                      [Parallelizable(ParallelScope.Fixtures)]
                      [TestFixture]
                      public class CoreTesteFormFromXML : DbTestFixture
                      {
                          private Core sut;
                  Severity: Minor
                  Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTesteFormFromXML.cs - About 2 hrs to fix

                    Class CoreTestCase has 24 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        [Parallelizable(ParallelScope.Fixtures)]
                        [TestFixture]
                        public class CoreTestCase : DbTestFixture
                        {
                            private Core sut;
                    Severity: Minor
                    Found in eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs - About 2 hrs to fix

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

                                              if (dataItemReply.GetType() == typeof(Microting.eForm.Infrastructure.Models.reply.Picture))
                                              {
                                                  fieldType = "picture";
                                                  Data.Entities.UploadedData dU =
                                                      await db.UploadedDatas.FirstOrDefaultAsync(x => x.FileLocation == dataItemReply.URL);
                      Severity: Major
                      Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 2 hrs to fix
                      eFormCore/Infrastructure/SqlController.cs on lines 1359..1379

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

                      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

                                              if (dataItemReply.GetType() == typeof(Microting.eForm.Infrastructure.Models.reply.Audio))
                                              {
                                                  fieldType = "audio";
                                                  Data.Entities.UploadedData dU =
                                                      await db.UploadedDatas.FirstOrDefaultAsync(x => x.FileLocation == dataItemReply.URL);
                      Severity: Major
                      Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 2 hrs to fix
                      eFormCore/Infrastructure/SqlController.cs on lines 1381..1401

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

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

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

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

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

                      Refactorings

                      Further Reading

                      Method Core_eForm_SimpleDateFormFromXML_ReturnseMainElement has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Method UploadedData_Delete_DoesSetWorkflowstateToRemoved has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                [Test]
                                public async Task UploadedData_Delete_DoesSetWorkflowstateToRemoved()
                                {
                                    //Arrange
                        
                        
                        Severity: Major
                        Found in eFormSDK.CheckLists.Tests/UploadedDataUTest.cs - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language