Showing 886 of 3,221 total issues
File Communicator.cs
has 689 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Microting.eForm.Dto;
File FieldValuesUTest.cs
has 688 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
Method Fields_Update_DoesUpdate
has 308 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Fields_Update_DoesUpdate()
{
short shortMinValue = Int16.MinValue;
short shortmaxValue = Int16.MaxValue;
Method DocxToPdf
has 308 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<string> DocxToPdf(int caseId, string templateId, string timeStamp,
Microting.eForm.Infrastructure.Data.Entities.Case dbCase, CaseDto cDto, string customPathForUploadedData,
string customXmlContent, string fileType, Language language)
{
SortedDictionary<string, string> valuePairs = new SortedDictionary<string, string>();
File QuestionTranslationUTest.cs
has 657 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
Method SQL_PostCase_CaseUpdateFieldValues
has 294 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_PostCase_CaseUpdateFieldValues()
{
// Arrance
Method Core_Case_CaseUpdate_ReturnsTrue
has 288 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_CaseUpdate_ReturnsTrue()
{
// Arrange
Method DownloadUploadedData
has 285 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<bool> DownloadUploadedData(int uploadedDataId)
{
string methodName = "Core.DownloadUploadedData";
Microting.eForm.Infrastructure.Data.Entities.UploadedData uploadedData =
await _sqlController.GetUploadedData(uploadedDataId).ConfigureAwait(false);
File SqlControllerTestSiteWorker.cs
has 636 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using eFormCore;
using Microsoft.EntityFrameworkCore;
using NUnit.Framework;
using System;
using System.Collections.Generic;
Method ChecksCreate
has 276 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<List<int>> ChecksCreate(Response response, string xmlString, int xmlIndex)
{
string methodName = "SqlController.ChecksCreate";
List<int> uploadedDataIds = new List<int>();
try
Method Core_Case_CaseUpdate_ReturnsTrue
has 272 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_CaseUpdate_ReturnsTrue()
{
// Arrange
#region Arrance
Method SQL_EntityGroup_EntityGroupUpdate_UpdatesEntityGroup
has 266 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_EntityGroup_EntityGroupUpdate_UpdatesEntityGroup()
{
// Arrance
Method SQL_EntityGroup_EntityGroupDelete_DeletesEntityGroup
has 266 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_EntityGroup_EntityGroupDelete_DeletesEntityGroup()
{
// Arrance
Method SQL_EntityGroup_EntityGroupUpdateName_UpdatesEnityGroupName
has 266 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_EntityGroup_EntityGroupUpdateName_UpdatesEnityGroupName()
{
// Arrance
Method CaseUpdateFieldValues
has a Cognitive Complexity of 82 (exceeds 20 allowed). Consider refactoring. Open
Open
public async Task<bool> CaseUpdateFieldValues(int caseId, Language language)
{
string methodName = "SqlController.CaseUpdateFieldValues";
try
{
- Read upRead up
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
File CheckListsUTest.cs
has 602 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
Method Core_Case_CaseToJasperXml_ReturnsPath
has 261 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_CaseToJasperXml_ReturnsPath()
{
// Arrange
#region Arrance
File DataItem.cs
has 595 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using Microting.eForm.Dto;
using KeyValuePair = Microting.eForm.Dto.KeyValuePair;
Method Core_Case_GetHttpServerAddress_returnsPath
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_GetHttpServerAddress_returnsPath()
{
// Arrange
#region Arrance
Method Core_Case_GetPdfPath_returnsPath
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_GetPdfPath_returnsPath()
{
// Arrange
#region Arrance