microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

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

        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "LastIp",
                table: "units",
Severity: Major
Found in eFormCore/Migrations/20200224092512_AddingMoreAttributesToUnits.cs - About 3 hrs to fix

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

            public async Task<bool> CheckStatusByMicrotingUid(int microtingUid)
            {
                string methodName = "Core.CheckStatusByMicrotingUid";
                List<CaseDto> lstCase = new List<CaseDto>();
                MainElement mainElement = new MainElement();
    Severity: Major
    Found in eFormCore/Core.cs - About 3 hrs to fix

      File SqlControllerTestSite.cs has 313 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.SqlControllerTests/SqlControllerTestSite.cs - About 3 hrs to fix

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

                [Test]
                public async Task SQL_Tags_DeleteTag_DoesMarkTagAsRemoved()
                {
                    // Arrance
                    string tagName = "Tag1";
        eFormSDK.Integration.Base.CoreTests/CoreTestTag.cs on lines 103..122

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

        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

                [Test]
                public async Task Core_Tags_DeleteTag_DoesMarkTagAsRemoved()
                {
                    // Arrance
                    string tagName = "Tag1";
        Severity: Major
        Found in eFormSDK.Integration.Base.CoreTests/CoreTestTag.cs and 1 other location - About 3 hrs to fix
        eFormSDK.Integration.Base.SqlControllerTests/SqlControllerTestTag.cs on lines 89..112

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

        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

                    migrationBuilder.CreateTable(
                        name: "languages",
                        columns: table => new
                        {
                            id = table.Column<int>(nullable: false)
        eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 348..364

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

        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

                    migrationBuilder.CreateTable(
                        name: "site_survey_configuraions",
                        columns: table => new
                        {
                            id = table.Column<int>(nullable: false)
        eFormCore/Migrations/20190315092242_AddingModelseForInsight.cs on lines 158..174

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

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

                public async Task<bool> GetAllSurveyConfigurations()
                {
                    var parsedData = JObject.Parse(await _communicator.GetAllSurveyConfigurations().ConfigureAwait(false));
        
                    var jsonSerializerSettings = new JsonSerializerSettings
        Severity: Major
        Found in eFormCore/Core.cs - About 3 hrs to fix

          Method Taggings_Delete_DoesSetWorkflowStateToRemoved has 86 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

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

                    [Test]
                    public async Task Core_Tags_CreateTag_DoesRecreateRemovedTag()
                    {
                        // Arrance
                        string tagName = "Tag1";
            Severity: Major
            Found in eFormSDK.Integration.Base.CoreTests/CoreTestTag.cs and 1 other location - About 3 hrs to fix
            eFormSDK.Integration.Base.SqlControllerTests/SqlControllerTestTag.cs on lines 114..137

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

            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<List<SiteDto>> Advanced_SiteReadAll(string workflowState, int? offSet, int? limit)
                    {
                        string methodName = "Core.Advanced_SiteReadAll";
                        try
                        {
            Severity: Major
            Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
            eFormCore/Core.cs on lines 4712..4730

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

            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<List<WorkerDto>> Advanced_WorkerReadAll(string workflowState, int? offSet, int? limit)
                    {
                        string methodName = "Core.Advanced_WorkerReadAll";
                        try
                        {
            Severity: Major
            Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
            eFormCore/Core.cs on lines 4461..4479

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

            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

                    [Test]
                    public async Task SQL_Tags_CreateTag_DoesRecreateRemovedTag()
                    {
                        // Arrance
                        string tagName = "Tag1";
            eFormSDK.Integration.Base.CoreTests/CoreTestTag.cs on lines 124..143

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

            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

                            columns: table => new
                            {
                                Id = table.Column<int>(type: "int", nullable: false)
                                    .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                                CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
            Severity: Major
            Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs and 1 other location - About 3 hrs to fix
            eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 456..466

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

            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

                            columns: table => new
                            {
                                Id = table.Column<int>(type: "int", nullable: false)
                                    .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                                CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
            Severity: Major
            Found in eFormCore/Migrations/20201223104631_AddingTranslations.cs and 1 other location - About 3 hrs to fix
            eFormCore/Migrations/20201223104631_AddingTranslations.cs on lines 394..404

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

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

                    [Test] // Core_Template_TemplateFromXml_ReturnsTemplate()
                    public async Task Core_eForm_QuickSyncEnabledeFormFromXML_ReturnseMainElement()
                    {
                        // Arrange
                        string xmlstring = @"

              Method CheckListSites_Delete_DoesSetWorkflowStateToRemoved has 85 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method TemplateUploadData has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public async Task<MainElement> TemplateUploadData(MainElement mainElement)
                        {
                            if (mainElement == null)
                                throw new ArgumentNullException(nameof(mainElement), "mainElement not allowed to be null");
                
                
                Severity: Major
                Found in eFormCore/Core.cs - About 3 hrs to fix

                  Method RunConsole has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public async Task RunConsole()
                          {
                              #region warning
                  
                              Console.WriteLine("");
                  Severity: Major
                  Found in eFormCore/AdminTools.cs - About 3 hrs to fix

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

                                            if (dataItem.Label.Split("|").Length > 1)
                                            {
                                                fieldTranslation = new FieldTranslation
                                                {
                                                    LanguageId = ukLanguage.Id,
                    Severity: Major
                    Found in eFormCore/Infrastructure/SqlController.cs and 1 other location - About 3 hrs to fix
                    eFormCore/Infrastructure/SqlController.cs on lines 6204..6221

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language