microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

Method question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayTrue has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                [Test]
        public async Task question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayTrue()
        {
            // Arrange
            string name = Guid.NewGuid().ToString();
Severity: Major
Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs - About 2 hrs to fix

    Method question_Create_DoesCreate_QuestionSetFalse_ValidDisplayImageTrue has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                            [Test]
            public async Task question_Create_DoesCreate_QuestionSetFalse_ValidDisplayImageTrue()
            {
                // Arrange
                string name = Guid.NewGuid().ToString();
    Severity: Major
    Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs - About 2 hrs to fix

      Method question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayImageTrue has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                                      [Test]
              public async Task question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayImageTrue()
              {
                  // Arrange
                  string name = Guid.NewGuid().ToString();
      Severity: Major
      Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs - About 2 hrs to fix

        Method InsertImages has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public static void InsertImages(WordprocessingDocument wordDoc,
                    List<KeyValuePair<string, List<string>>> pictures)
                {
                    string currentHeader = "";
                    List<Paragraph> foundEntriesToClearText = new List<Paragraph>();
        Severity: Major
        Found in eFormCore/Helpers/ReportHelper.cs - About 2 hrs to fix

          Method Close has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task<bool> Close()
          #pragma warning restore 1998
                  {
                      string methodName = "Core.Close";
                      Log.LogStandard(methodName, "Close called");
          Severity: Major
          Found in eFormCore/Core.cs - About 2 hrs to fix

            Method SiteWorkers_Delete_DoesSetWorkflowStateToRemoved has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method EntityItemCreate has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      private async Task<EntityItem> EntityItemCreate(int entitItemGroupId, string name, string description,
                          string ownUuid, int displayIndex)
                      {
                          EntityGroup eg = await _sqlController.EntityGroupRead(entitItemGroupId).ConfigureAwait(false);
                          EntityItem et = await _sqlController.EntityItemRead(entitItemGroupId, name, description)
              Severity: Major
              Found in eFormCore/Core.cs - About 2 hrs to fix

                File Tools.cs has 254 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using System;
                using System.Collections.Generic;
                using System.Diagnostics;
                using System.Linq;
                using System.Runtime.CompilerServices;
                Severity: Minor
                Found in eFormCore/Tools.cs - About 2 hrs to fix

                  Method SubscriberThread has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
                  Open

                          private void SubscriberThread()
                          {
                              var token = _sqlController.SettingRead(Settings.token).GetAwaiter().GetResult();
                              if (token != "UNIT_TEST___________________L:32" && token != "abc1234567890abc1234567890abcdef")
                              {
                  Severity: Minor
                  Found in eFormCore/Services/Subscriber.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_Folders_CreateSubFolder_DoesCreateSubFolder has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          [Test]
                          public async Task Core_Folders_CreateSubFolder_DoesCreateSubFolder()
                          {
                              // Arrange
                  
                  Severity: Major
                  Found in eFormSDK.Integration.Base.CoreTests/CoreTestFolders.cs - About 2 hrs to fix

                    Method SQL_answers_Create_DoesCreate_UTCAdjustedTrue has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method SetAutoIncrementforTables has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private void SetAutoIncrementforTables(MigrationBuilder migrationBuilder)
                              {
                                  List<string> modelNames = new List<string>();
                                  modelNames.Add("case_versions");
                                  modelNames.Add("cases");
                      Severity: Major
                      Found in eFormCore/Migrations/20180810124416_InitialCreate.cs - About 2 hrs to fix

                        Method CaseCreate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                public async Task<int> CaseCreate(int checkListId, int siteUId, int? microtingUId, int? microtingCheckId,
                                    string caseUId, string custom, DateTime createdAt, int? folderId)
                                {
                                    string methodName = "SqlController.CaseCreate";
                                    _log.LogStandard(methodName, "called");
                        Severity: Major
                        Found in eFormCore/Infrastructure/SqlController.cs - About 2 hrs to fix

                          Method FolderUpdate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public async Task FolderUpdate(int id, List<CommonTranslationsModel> translations, int? parentId)
                                  {
                                      string methodName = "Core.FolderUpdate";
                                      try
                                      {
                          Severity: Major
                          Found in eFormCore/Core.cs - About 2 hrs to fix

                            Method QuestionSets_Update_DoesUpdate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method GetAllQuestionSets has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public async Task<bool> GetAllQuestionSets()
                                      {
                                          var parsedData = JObject.Parse(await _communicator.GetAllQuestionSets().ConfigureAwait(false));
                              
                                          if (!parsedData.HasValues)
                              Severity: Major
                              Found in eFormCore/Core.cs - About 2 hrs to fix

                                Method UploadedData_Create_DoesCreate has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Method Core_Case_CaseCreate_CreatesCase has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          [Test]//needs http mock done
                                          public async Task Core_Case_CaseCreate_CreatesCase()
                                          {
                                              // Arrange
                                              #region Template1
                                  Severity: Major
                                  Found in eFormSDK.Integration.Tests/CoreTestCaseCreate.cs - About 2 hrs to fix

                                    Method question_Create_DoesCreate_QuestionSetFalse_BackButtonEnabledImageTrue has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            [Test]
                                            public async Task question_Create_DoesCreate_QuestionSetFalse_BackButtonEnabledImageTrue()
                                            {
                                                // Arrange
                                                string name = Guid.NewGuid().ToString();
                                    Severity: Major
                                    Found in eFormSDK.Integration.Tests/SqlControllerTestQuestion.cs - About 2 hrs to fix

                                      Method EntityItems_Create_DoesCreate has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

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