microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

Method FieldValueRead has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public async Task<Models.FieldValue> FieldValueRead(FieldValue reply, bool joinUploadedData, Language language)
        {
            string methodName = "SqlController.FieldValueRead";

            try
Severity: Minor
Found in eFormCore/Infrastructure/SqlController.cs - About 1 hr to fix

    Method EntityGroupCreate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public async Task<EntityGroup> EntityGroupCreate(string name, string entityType, string description)
            {
                string methodName = "SqlController.EntityGroupCreate";
                try
                {
    Severity: Minor
    Found in eFormCore/Infrastructure/SqlController.cs - About 1 hr to fix

      Method InsertSignature has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public static void InsertSignature(WordprocessingDocument wordDoc, List<KeyValuePair<string, string>> pictures)
              {
                  foreach (var keyValuePair in pictures)
                  {
                      WriteDebugConsoleLogEntry(new LogEntry(2, "ReportHelper.InsertSignature",
      Severity: Minor
      Found in eFormCore/Helpers/ReportHelper.cs - About 1 hr to fix

        Method Languages_Create_DoesCreate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                [Test]
                public async Task Languages_Create_DoesCreate()
                {
                    //Arrange
        
        
        Severity: Minor
        Found in eFormSDK.Base.Tests/LanguagesUTest.cs - About 1 hr to fix

          Method Advanced_EntityGroupAll has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task<EntityGroupList> Advanced_EntityGroupAll(string sort, string nameFilter, int pageIndex,
                      int pageSize, string entityType, bool desc, string workflowState)
                  {
                      if (entityType != Constants.FieldTypes.EntitySearch && entityType != Constants.FieldTypes.EntitySelect)
                          throw new Exception("EntityGroupAll failed. EntityType:" + entityType + " is not an known type");
          Severity: Minor
          Found in eFormCore/Core.cs - About 1 hr to fix

            Method SiteTags_Create_DoesCreate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Test]
                    public async Task SiteTags_Create_DoesCreate()
                    {
                        // Arrange
                        Random rnd = new Random();
            Severity: Minor
            Found in eFormSDK.Base.Tests/SiteTagsUTest.cs - About 1 hr to fix

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

                      protected override void Down(MigrationBuilder migrationBuilder)
                      {
                          migrationBuilder.DropColumn(
                              name: "original_id",
                              table: "fields");
              Severity: Major
              Found in eFormCore/Migrations/20190116110009_AddingOriginalId.cs and 2 other locations - About 1 hr to fix
              eFormCore/Migrations/20190711053344_AddingJasperDocxEnabledAttributesToCheckList.cs on lines 58..75
              eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.cs on lines 38..55

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

              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

                                      fieldTranslation = new FieldTranslation
                                      {
                                          LanguageId = language.Id,
                                          Text = dataItem.Label.Split("|")[0],
                                          Description = dataItem.Description != null
              Severity: Major
              Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 1 hr to fix
              eFormCore/Infrastructure/SqlController.cs on lines 6905..6915

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

              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

                      protected override void Down(MigrationBuilder migrationBuilder)
                      {
                          migrationBuilder.DropColumn(
                              name: "DefaultValue",
                              table: "FieldTranslationVersions");
              eFormCore/Migrations/20190116110009_AddingOriginalId.cs on lines 54..71
              eFormCore/Migrations/20190711053344_AddingJasperDocxEnabledAttributesToCheckList.cs on lines 58..75

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

              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

                      protected override void Down(MigrationBuilder migrationBuilder)
                      {
                          migrationBuilder.DropColumn(
                              name: "DocxExportEnabled",
                              table: "check_lists");
              eFormCore/Migrations/20190116110009_AddingOriginalId.cs on lines 54..71
              eFormCore/Migrations/20210730085329_AddingDefaultValueToFieldTranslations.cs on lines 38..55

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

              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

                                  fieldTranslation = new FieldTranslation
                                  {
                                      LanguageId = language.Id,
                                      Text = dataItem.Label.Split("|")[0],
                                      Description = dataItem.Description != null
              Severity: Major
              Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 1 hr to fix
              eFormCore/Infrastructure/SqlController.cs on lines 6840..6850

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

              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 CaseReadAll has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      public Task<CaseList> CaseReadAll(int? templateId, DateTime? start, DateTime? end, string workflowState,
                          string searchKey, bool descendingSort, string sortParameter, int pageIndex, int pageSize)
              Severity: Major
              Found in eFormCore/Core.cs - About 1 hr to fix

                Method DocxToPdf has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        private async Task<string> DocxToPdf(int caseId, string templateId, string timeStamp,
                            Microting.eForm.Infrastructure.Data.Entities.Case dbCase, CaseDto cDto, string customPathForUploadedData,
                            string customXmlContent, string fileType, Language language)
                Severity: Major
                Found in eFormCore/Core.cs - About 1 hr to fix

                  Method CreateEntityItem has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          public async Task<EntityItem> CreateEntityItem(string description, int displayIndex, int entityGroupId,
                              string entityItemUId, string microtingUId, string name, short? synced, int version, string workflowState)
                  Severity: Major
                  Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

                    Method SQL_SiteWorker_SiteWorkerCreate_ReturnsID has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method SQL_SiteWorker_SiteWorkerUpdate_UpdatesSiteWorker has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Method SQL_Case_CaseDelete_DoesCaseRemoved has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                [Test]
                                public async Task SQL_Case_CaseDelete_DoesCaseRemoved()
                                {
                                    // Arrance
                                    Random rnd = new Random();

                          Method SQL_SiteWorker_SiteWorkerDelete_DeletesSiteWorker has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Method SQL_Case_CaseDeleteResult_DoesMarkCaseRemoved has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    [Test]
                                    public async Task SQL_Case_CaseDeleteResult_DoesMarkCaseRemoved()
                                    {
                                        // Arrance
                                        Random rnd = new Random();

                              Method surveyConfiguration_Create_DoesCreate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      [Test]
                                      public async Task surveyConfiguration_Create_DoesCreate()
                                      {
                                          // Arrange
                                          Random rnd = new Random();
                              Severity: Minor
                              Found in eFormSDK.Integration.Tests/SqlControllerTestSurveyConfiguration.cs - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language