microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

Method SpeechToText has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public async Task<int> SpeechToText(Stream pathToAudioFile, string language, string extension)
        {
            try
            {
                var url = $"{_addressSpeechToText}/audio/?token={_token}&sdk_ver={_dllVersion}&lang={language}";
Severity: Minor
Found in eFormCore/Communication/Http.cs - About 1 hr to fix

    Method ValidateWordDocument has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public static void ValidateWordDocument(string filepath)
            {
                using (WordprocessingDocument wordprocessingDocument =
                       WordprocessingDocument.Open(filepath, true))
                {
    Severity: Minor
    Found in eFormCore/Helpers/ReportHelper.cs - About 1 hr to fix

      Method Post has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public async Task<string> Post(string data, string siteId, string contentType = "application/xml")
              {
                  try
                  {
                      WriteDebugConsoleLogEntry($"{GetType()}.{MethodBase.GetCurrentMethod()?.Name}",
      Severity: Minor
      Found in eFormCore/Communication/Http.cs - About 1 hr to fix

        Method OrganizationLoadAllFromRemote has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public async Task<OrganizationDto> OrganizationLoadAllFromRemote(string token)
                {
                    _log.LogEverything("Communicator.OrganizationLoadAllFromRemote", "called");
                    _log.LogVariable("Communicator.OrganizationLoadAllFromRemote", nameof(token), token);
                    IHttp specialHttp;
        Severity: Minor
        Found in eFormCore/Communication/Communicator.cs - About 1 hr to fix

          Method Setup has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [SetUp]
                  public async Task Setup()
                  {
                      Console.WriteLine($"{DateTime.Now} : Starting MariaDb Container...");
                      await _mariadbTestcontainer.StartAsync();
          Severity: Minor
          Found in eFormSDK.Base.Tests/DbTestFixture.cs - About 1 hr to fix

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

                        Microting.eForm.Infrastructure.Data.Entities.Case aCase =
                            new Microting.eForm.Infrastructure.Data.Entities.Case
                            {
                                MicrotingUid = rnd.Next(1, 255),
                                MicrotingCheckUid = rnd.Next(1, 255),
            eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs on lines 275..283
            eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs on lines 316..324

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

            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

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

                        Microting.eForm.Infrastructure.Data.Entities.Case aCase =
                            new Microting.eForm.Infrastructure.Data.Entities.Case
                            {
                                MicrotingUid = rnd.Next(1, 255),
                                MicrotingCheckUid = rnd.Next(1, 255),
            eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs on lines 275..283
            eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs on lines 357..365

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

            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

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

                        Microting.eForm.Infrastructure.Data.Entities.Case aCase =
                            new Microting.eForm.Infrastructure.Data.Entities.Case
                            {
                                MicrotingUid = rnd.Next(1, 255),
                                MicrotingCheckUid = rnd.Next(1, 255),
            eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs on lines 316..324
            eFormSDK.Integration.Case.SqlControllerTests/SqlControllerTestCase.cs on lines 357..365

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

            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

                        catch (Exception ex)
                        {
                            await _sqlController.NotificationUpdate(message.notificationUId, message.MicrotringUUID,
                                Constants.WorkflowStates.NotFound, ex.Message, ex.StackTrace);
                            NoteDto noteDto = new NoteDto(message.notificationUId, message.MicrotringUUID,
            Severity: Major
            Found in eFormCore/Handlers/EformRetrievedHandler.cs and 2 other locations - About 1 hr to fix
            eFormCore/Handlers/EformCompletedHandler.cs on lines 69..76
            eFormCore/Handlers/UnitActivatedHandler.cs on lines 66..73

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

            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

                        catch (Exception ex)
                        {
                            await _sqlController.NotificationUpdate(message.notificationUId, message.MicrotringUUID,
                                Constants.WorkflowStates.NotFound, ex.Message, ex.StackTrace);
                            NoteDto noteDto = new NoteDto(message.notificationUId, message.MicrotringUUID,
            Severity: Major
            Found in eFormCore/Handlers/UnitActivatedHandler.cs and 2 other locations - About 1 hr to fix
            eFormCore/Handlers/EformCompletedHandler.cs on lines 69..76
            eFormCore/Handlers/EformRetrievedHandler.cs on lines 64..71

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

            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

                        catch (Exception ex)
                        {
                            await _sqlController.NotificationUpdate(message.NotificationUId, message.MicrotringUUID,
                                Constants.WorkflowStates.NotFound, ex.Message, ex.StackTrace);
                            NoteDto noteDto = new NoteDto(message.NotificationUId, message.MicrotringUUID,
            Severity: Major
            Found in eFormCore/Handlers/EformCompletedHandler.cs and 2 other locations - About 1 hr to fix
            eFormCore/Handlers/EformRetrievedHandler.cs on lines 64..71
            eFormCore/Handlers/UnitActivatedHandler.cs on lines 66..73

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

            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 4 locations. Consider refactoring.
            Open

                    public async Task FireHandleCaseRetrived(CaseDto caseDto)
            #pragma warning restore 1998
                    {
                        string methodName = "Core.FireHandleCaseRetrived";
                        Log.LogStandard(methodName, $"FireHandleCaseRetrived for MicrotingUId {caseDto.MicrotingUId}");
            Severity: Major
            Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
            eFormCore/Core.cs on lines 6646..6661
            eFormCore/Core.cs on lines 6709..6725
            eFormCore/Core.cs on lines 6728..6744

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

            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 4 locations. Consider refactoring.
            Open

                    public async Task FireHandleCaseProcessingError(CaseDto caseDto)
            #pragma warning restore 1998
                    {
                        string methodName = "Core.FireHandleCaseProcessingError";
                        Log.LogStandard(methodName, $"HandleCaseProcessingError for MicrotingUId {caseDto.MicrotingUId}");
            Severity: Major
            Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
            eFormCore/Core.cs on lines 6646..6661
            eFormCore/Core.cs on lines 6709..6725
            eFormCore/Core.cs on lines 6747..6763

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

            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 4 locations. Consider refactoring.
            Open

                    public async Task FireHandleCaseCompleted(CaseDto caseDto)
            #pragma warning restore 1998
                    {
                        string methodName = "Core.FireHandleCaseCompleted";
                        Log.LogStandard(methodName, $"FireHandleCaseCompleted for MicrotingUId {caseDto.MicrotingUId}");
            Severity: Major
            Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
            eFormCore/Core.cs on lines 6709..6725
            eFormCore/Core.cs on lines 6728..6744
            eFormCore/Core.cs on lines 6747..6763

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

            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 class Signature : DataItem
                {
                    internal Signature()
                    {
                    }
            Severity: Major
            Found in eFormCore/Infrastructure/Models/DataItem.cs and 1 other location - About 1 hr to fix
            eFormCore/Infrastructure/Models/DataItem.cs on lines 230..249

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

            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 4 locations. Consider refactoring.
            Open

                    public async Task FireHandleCaseProcessedByServer(CaseDto caseDto)
            #pragma warning restore 1998
                    {
                        string methodName = "Core.FireHandleCaseProcessedByServer";
                        Log.LogStandard(methodName, $"HandleCaseProcessedByServer for MicrotingUId {caseDto.MicrotingUId}");
            Severity: Major
            Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
            eFormCore/Core.cs on lines 6646..6661
            eFormCore/Core.cs on lines 6728..6744
            eFormCore/Core.cs on lines 6747..6763

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

            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 class None : DataItem
                {
                    internal None()
                    {
                    }
            Severity: Major
            Found in eFormCore/Infrastructure/Models/DataItem.cs and 1 other location - About 1 hr to fix
            eFormCore/Infrastructure/Models/DataItem.cs on lines 451..470

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

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

                    [Test]
                    public async Task EntityGroups_Create_DoesCreate()
                    {
                        EntityGroup entityGroup = new EntityGroup
                        {
            Severity: Minor
            Found in eFormSDK.CheckLists.Tests/EntityGroupsUTest.cs - About 1 hr to fix

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

                      [Test]
                      public async Task Core_Case_CaseDeleteResult_DoesMarkCaseRemoved()
                      {
              
                          // Arrance
              Severity: Minor
              Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 hr to fix

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

                        public async Task<UploadedData> FileRead()
                        {
                            string methodName = "SqlController.FileRead";
                            try
                            {
                Severity: Minor
                Found in eFormCore/Infrastructure/SqlController.cs - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language