microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

        public async Task<List<int>> CaseCreate(MainElement mainElement, string caseUId, List<int> siteUids,
            string custom, int? folderId)
        {
            string methodName = "Core.CaseCreate";
            try
Severity: Major
Found in eFormCore/Core.cs - About 2 hrs to fix

    Method SurveyConfigurations_Delete_DoesSetWorkflowStateToRemoved has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method Folders_Update_DoesUpdate has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        File CoreTestSite.cs has 259 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using System.IO;
        using System.Linq;
        using System.Reflection;
        using System.Threading.Tasks;
        Severity: Minor
        Found in eFormSDK.Integration.Base.CoreTests/CoreTestSite.cs - About 2 hrs to fix

          Method question_Delete_DoesDelete_AllFalse has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method question_Delete_DoesDelete_QuestionSetTrue_BackButtonEnabledTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method question_Delete_DoesDelete_QuestionSetFalse_PrioritisedTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method question_Delete_DoesDelete_QuestionSetTrue_PrioritisedTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method question_Delete_DoesDelete_QuestionSetTrue_ImageTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Method question_Delete_DoesDelete_QuestionSetFalse_ValidDisplayTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method question_Delete_DoesDelete_QuestionSetFalse_ImageTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Method question_Delete_DoesDelete_QuestionSetTrue_ValidDisplayTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method question_Delete_DoesDelete_AllTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Method question_Delete_DoesDelete_QuestionSetFalse_BackButtonEnabledTrue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method Units_Create_DoesCreate has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Method SiteWorkers_Update_DoesUpdate has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

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

                                                      case Constants.Constants.FieldTypes.Picture:
                                                          lstDataItem.Add(new Picture(_t.Int(field.Id), _t.Bool(field.Mandatory), _t.Bool(field.ReadOnly),
                                                              fieldTranslation.Text, fieldTranslation.Description, field.Color,
                                                              _t.Int(field.DisplayIndex), _t.Bool(field.Dummy),
                                                              _t.Int(field.Multi), _t.Bool(field.GeolocationEnabled)));
                                  Severity: Major
                                  Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 2 hrs to fix
                                  eFormCore/Infrastructure/SqlController.cs on lines 7133..7138

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

                                  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

                                                      case Constants.Constants.FieldTypes.CheckBox:
                                                          lstDataItem.Add(new CheckBox(_t.Int(field.Id), _t.Bool(field.Mandatory),
                                                              _t.Bool(field.ReadOnly), fieldTranslation.Text, fieldTranslation.Description, field.Color,
                                                              _t.Int(field.DisplayIndex), _t.Bool(field.Dummy),
                                                              _t.Bool(fieldTranslation.DefaultValue), _t.Bool(field.Selected)));
                                  Severity: Major
                                  Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 2 hrs to fix
                                  eFormCore/Infrastructure/SqlController.cs on lines 7211..7216

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

                                  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

                                  Class CoreTestAdvanced has 21 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

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

                                    Class SqlControllerTestCase has 21 methods (exceeds 20 allowed). Consider refactoring.
                                    Open

                                        [Parallelizable(ParallelScope.Fixtures)]
                                        [TestFixture]
                                        public class SqlControllerTestCase : DbTestFixture
                                        {
                                            private SqlController sut;
                                    Severity: Minor
                                    Found in eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language