microting/eform-sdk-dotnet

View on GitHub

Showing 886 of 3,221 total issues

Avoid deeply nested control flow statements.
Open

                            if (dataItem.Id == answer.FieldId)
                            {
                                dataItemListTemp2.Add(answer);
                                break;
                            }
Severity: Major
Found in eFormCore/Core.cs - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                            foreach (var value in profile.Values)
                                            {
                                                Console.WriteLine("{0}({1}): {2}", value.Tag, value.DataType, value);
    
                                                if (value.Tag == ExifTag.Orientation)
    Severity: Major
    Found in eFormCore/Core.cs - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if (uploadedData.FileName != null)
                                      {
                                          jasperFieldXml.Append(Environment.NewLine);
                                          string bigFilename =
                                              $"{uploadedData.Id}_700_{uploadedData.Checksum}{uploadedData.Extension}";
      Severity: Major
      Found in eFormCore/Core.cs - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    foreach (FieldValue answer in field.FieldValues)
                                    {
                                        jasperFieldXml += GetJasperFieldValue(field, answer, customPathForUploadedData)
                                            .GetAwaiter().GetResult();
                                    }
        Severity: Major
        Found in eFormCore/Core.cs - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      foreach (var answer in lstAnswers)
                                      {
                                          if (dataItem.Id == answer.Id)
                                          {
                                              dataItemListTemp.Add(answer);
          Severity: Major
          Found in eFormCore/Core.cs - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                        if (unit.Manufacturer == "iOS")
                                                        {
                                                            // CW90, Normal, 270 CW, Rotate 180
                                                            if (value.GetValue().ToString() == "6")
                                                            {
            Severity: Major
            Found in eFormCore/Core.cs - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                          if (value.Tag == ExifTag.Orientation)
                                                          {
                                                              if (unit.Manufacturer == "iOS")
                                                              {
                                                                  Console.WriteLine($"rotate value is {value.GetValue()}");
              Severity: Major
              Found in eFormCore/Core.cs - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if (preLabel != "")
                                            {
                                                CheckListTranslation checkListTranslation =
                                                    await dbContext.CheckListTranslations.FirstAsync(x =>
                                                        x.CheckListId == parentCheckList.Id && x.LanguageId == language.Id);
                Severity: Major
                Found in eFormCore/Core.cs - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                      foreach (KeyValuePair kvP in tempList)
                                                      {
                                                          if (kvP.Key == i.ToString())
                                                          {
                                                              value = kvP.Value;
                  Severity: Major
                  Found in eFormCore/Core.cs - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                foreach (Check check in resp.Checks)
                                                {
                                                    int unitUId = _sqlController.UnitRead(int.Parse(check.UnitId)).GetAwaiter().GetResult()
                                                        .UnitUId;
                                                    Log.LogVariable(methodName, nameof(unitUId), unitUId);
                    Severity: Major
                    Found in eFormCore/Core.cs - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if (preLabel != "")
                                                              lstReturn.Add(subField.Id + "|" + preLabel + sep + fieldTranslation.Text +
                                                                            sep +
                                                                            subFieldTranslation.Text);
                                                          else
                      Severity: Major
                      Found in eFormCore/Core.cs - About 45 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (string.IsNullOrEmpty(nameFilter))
                                    {
                                        eILst = dbContext.EntityItems.Where(x => x.EntityGroupId == eG.Id
                                                                                 && x.WorkflowState !=
                                                                                 Constants.Constants.WorkflowStates.Removed
                        Severity: Major
                        Found in eFormCore/Infrastructure/Data/Entities/EntityGroup.cs - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                          if (await db.CheckLists.AnyAsync(x => x.ParentId == checkList.Id))
                                          {
                                              List<Element> elementList = new List<Element>();
                                              foreach (CheckList subList in await db.CheckLists.AsNoTracking()
                                                           .Where(x => x.WorkflowState != Constants.Constants.WorkflowStates.Removed)
                          Severity: Major
                          Found in eFormCore/Infrastructure/SqlController.cs - About 40 mins to fix

                            Method CaseUpdateCompleted has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    public async Task CaseUpdateCompleted(int microtingUId, int microtingCheckId, DateTime doneAt,
                                        int workerMicrotingUId, int unitMicrotingUid)
                            Severity: Minor
                            Found in eFormCore/Infrastructure/SqlController.cs - About 35 mins to fix

                              Method NotificationUpdate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      public async Task NotificationUpdate(string notificationUId, int microtingUId, string workflowState,
                                          string exception, string stacktrace)
                              Severity: Minor
                              Found in eFormCore/Infrastructure/SqlController.cs - About 35 mins to fix

                                Method ReadFieldValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        private async Task<Models.FieldValue> ReadFieldValue(MicrotingDbContext db, FieldValue reply, Field dbField, bool joinUploadedData,
                                            Language language)
                                Severity: Minor
                                Found in eFormCore/Infrastructure/SqlController.cs - About 35 mins to fix

                                  Method FieldValueReadAllValues has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          public async Task<List<List<KeyValuePair>>> FieldValueReadAllValues(int fieldId, List<int> caseIds,
                                              string customPathForUploadedData, Language language, bool gpsCoordinates)
                                  Severity: Minor
                                  Found in eFormCore/Infrastructure/SqlController.cs - About 35 mins to fix

                                    Method FileProcessed has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            public async Task FileProcessed(string urlString, string checkSum, string fileLocation, string fileName, int Id)
                                    Severity: Minor
                                    Found in eFormCore/Infrastructure/SqlController.cs - About 35 mins to fix

                                      Method GetDataItem has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              private async Task GetDataItem(List<DataItem> lstDataItem, List<DataItemGroup> lstDataItemGroup, Field field,
                                                  Language language, bool includeDummyFields)
                                      Severity: Minor
                                      Found in eFormCore/Infrastructure/SqlController.cs - About 35 mins to fix

                                        Method Advanced_WorkerUpdate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                                public async Task<bool> Advanced_WorkerUpdate(int workerId, string firstName, string lastName, string email,
                                                    string legacyEmail)
                                        Severity: Minor
                                        Found in eFormCore/Core.cs - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language