microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

Method Core_eFormSimpleCheckBoxFormFromXML_ReturnseMainElement has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Method EntityItems_Delete_DoesSetWorkflowStateToRemoved has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      File CheckListSitesUTest.cs has 271 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: Minor
      Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs - About 2 hrs to fix

        Method options_Create_DoesCreate has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method CreateMultiPictureXMLResult has 62 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task<string> CreateMultiPictureXMLResult(bool create)
                  {
                      if (create)
                      {
                          await testHelpers.GenerateDefaultLanguages();
          Severity: Major
          Found in eFormCore/Helpers/TestHelperReturnXML.cs - About 2 hrs to fix

            Method CaseToJasperXml has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public async Task<string> CaseToJasperXml(CaseDto cDto, ReplyElement reply, int caseId, string timeStamp,
                        string customPathForUploadedData, string customXMLContent, Language language)
                    {
                        string methodName = "Core.CaseToJasperXml";
                        try
            Severity: Major
            Found in eFormCore/Core.cs - About 2 hrs to fix

              Method QuestionTranslation_Create_DoesCreate_W_MicrotingUID has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method Core_eForm_SimplePictureFormFromXML_ReturnseMainElement has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method Core_eFormSimpleSaveButtonFormFromXML_ReturnseMainElement has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Method LanguageQuestionSet_Update_DoesUpdate_WO_MicrotingUid has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method Options_Create_DoesCreate has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Method QuestionTranslation_Create_DoesCreate_WO_MicrotingUID has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method TemplateItemRead has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
                          Open

                                  public async Task<Template_Dto> TemplateItemRead(int templateId, Language language)
                                  {
                                      string methodName = "SqlController.TemplateItemRead";
                          
                                      try
                          Severity: Minor
                          Found in eFormCore/Infrastructure/SqlController.cs - About 2 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_Site_SiteDelete_ReturnsTrue has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  [Test] //Using Communicatorn needs httpMock
                                  public async Task Core_Site_SiteDelete_ReturnsTrue()
                                  {
                                      // Arrange
                                      string siteName = Guid.NewGuid().ToString();
                          Severity: Major
                          Found in eFormSDK.Integration.Base.CoreTests/CoreTestSite.cs - About 2 hrs to fix

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

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

                              Method DbFieldToField has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      private async Task<Models.Field> DbFieldToField(MicrotingDbContext db, Field dbField, Language language)
                                      {
                                          //await using var db = GetContext();
                                          Models.Field field = new Models.Field
                                          {
                              Severity: Major
                              Found in eFormCore/Infrastructure/SqlController.cs - About 2 hrs to fix

                                Method SiteSurveyConfiguration_Delete_DoesDelete has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Method LanguageQuestionSet_Update_DoesUpdate_WO_MicrotingUid_AddsUid has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Method Core_eFormSimpleInfoboxFormFromXML_ReturnseMainElement has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

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

                                      Method GetChecksAndFields has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              private void GetChecksAndFields(ref string clsLst, ref string fldLst, List<Element> elementLst,
                                                  string customPathForUploadedData)
                                              {
                                                  var db = DbContextHelper.GetDbContext();
                                                  string jasperFieldXml = "";
                                      Severity: Major
                                      Found in eFormCore/Core.cs - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language