Showing 886 of 3,221 total issues
Method Core_Case_GetJasperPath_returnsPath
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_GetJasperPath_returnsPath()
{
// Arrange
#region Arrance
Method Core_Case_GetPicturePath_returnsPath
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_GetPicturePath_returnsPath()
{
// Arrange
#region Arrance
Method CaseReadAll
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<CaseList> CaseReadAll(int? templatId, DateTime? start, DateTime? end, string workflowState,
string searchKey, bool descendingSort, string sortParameter, int offSet, int pageSize,
TimeZoneInfo timeZoneInfo)
{
string methodName = "SqlController.CaseReadAll";
Method Core_Case_CasesToCsv_returnsPathAndName
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_CasesToCsv_returnsPathAndName()
{
// Arrange
#region Arrance
Method FieldValueReadAllValues
has 253 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<List<List<KeyValuePair>>> FieldValueReadAllValues(int fieldId, List<int> caseIds,
string customPathForUploadedData, string decimalSeparator, string thousandSeparator, Language language,
bool gpsCoordinates)
{
string methodName = "SqlController.FieldValueReadAllValues";
Method Fields_Delete_DoesSetWorkflowStateToRemoved
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Fields_Delete_DoesSetWorkflowStateToRemoved()
{
short shortMinValue = Int16.MinValue;
short shortmaxValue = Int16.MaxValue;
Method Up
has 250 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "LogExceptions");
Class SqlControllerTestQuestion
has 67 methods (exceeds 20 allowed). Consider refactoring. Open
Open
[TestFixture]
public class SqlControllerTestQuestion : DbTestFixture
{
#region create
[Test]
Method Checklists_Update_DoesUpdate
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Checklists_Update_DoesUpdate()
{
//Arrange
Method SubChecks
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<Element> SubChecks(MicrotingDbContext db, int parentId, Case theCase, Language language)
{
string methodName = "SqlController.SubChecks";
try
{
File SqlControllerTestQuestionSet.cs
has 572 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 GenerateDataSetFromCases
has a Cognitive Complexity of 76 (exceeds 20 allowed). Consider refactoring. Open
Open
public async Task<List<List<string>>> GenerateDataSetFromCases(int? checkListId, DateTime? start, DateTime? end,
string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool includeCheckListText,
bool gpsCoordinates)
{
- 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
Method FieldValues_Update_DoesUpdate
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task FieldValues_Update_DoesUpdate()
{
short shortMinValue = Int16.MinValue;
short shortmaxValue = Int16.MaxValue;
Method Core_Case_CaseUpdateFieldValues
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_CaseUpdateFieldValues()
{
// Arrance
Method Core_Case_CaseUpdateFieldValues
has 236 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Case_CaseUpdateFieldValues()
{
File CoreTestFolders.cs
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
Method ReadFieldValue
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<Models.FieldValue> ReadFieldValue(MicrotingDbContext db, FieldValue reply, Field dbField, bool joinUploadedData,
Language language)
{
string methodName = "SqlController.ReadFieldValue";
try
Method Up
has 226 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameTable(
name: "answer_value_versions",
null,
File CasesUTest.cs
has 542 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 FieldValues_Delete_DoesSetWorkflowStateToRemoved
has 223 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task FieldValues_Delete_DoesSetWorkflowStateToRemoved()
{
short shortMinValue = Int16.MinValue;
short shortmaxValue = Int16.MaxValue;