Showing 886 of 3,221 total issues
File 20190315092242_AddingModelseForInsight.Designer.cs
has 1283 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
File 20240619132520_AddPinCodeEmployeeNoToWorker.cs
has 1191 lines of code (exceeds 250 allowed). Consider refactoring. Open
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
File 20180810124416_InitialCreate.cs
has 1181 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
Method Up
has 598 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "Id",
table: "WorkerVersions",
Class Core
has 151 methods (exceeds 20 allowed). Consider refactoring. Open
public class Core : CoreBase
{
// events
public event EventHandler HandleCaseCreated;
public event EventHandler HandleCaseRetrived;
Method ChecksCreate
has a Cognitive Complexity of 161 (exceeds 20 allowed). Consider refactoring. Open
public async Task<List<int>> ChecksCreate(Response response, string xmlString, int xmlIndex)
{
string methodName = "SqlController.ChecksCreate";
List<int> uploadedDataIds = new List<int>();
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
Method Core_EntityGroup_Advanced_EntityGroupAll_ReturnsEntityGroups
has 592 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_EntityGroup_Advanced_EntityGroupAll_ReturnsEntityGroups()
{
// Arrance
Method SQL_EntityGroup_EntityGroupAll_ReturnsEntityGroups
has 590 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_EntityGroup_EntityGroupAll_ReturnsEntityGroups()
{
// Arrance
Method Down
has 582 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "EmployeeNo",
table: "WorkerVersions");
Method ReadFieldValue
has a Cognitive Complexity of 154 (exceeds 20 allowed). Consider refactoring. Open
private async Task<Models.FieldValue> ReadFieldValue(MicrotingDbContext db, FieldValue reply, Field dbField, bool joinUploadedData,
Language language)
{
string methodName = "SqlController.ReadFieldValue";
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 SqlControllerTestCase.cs
has 1107 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
Class SqlController
has 131 methods (exceeds 20 allowed). Consider refactoring. Open
public class SqlController : LogWriter
{
// var
private Log _log;
File SqlControllerTestCaseReadAllShort.cs
has 988 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
File 20190116110009_AddingOriginalId.Designer.cs
has 971 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
File 20180810124416_InitialCreate.Designer.cs
has 967 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
Method SubChecks
has a Cognitive Complexity of 133 (exceeds 20 allowed). Consider refactoring. Open
private async Task<Element> SubChecks(MicrotingDbContext db, int parentId, Case theCase, Language language)
{
string methodName = "SqlController.SubChecks";
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
Method Up
has 474 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void Up(MigrationBuilder migrationBuilder)
{
//Setup for SQL Server Provider
string autoIDGenStrategy = "SqlServer:ValueGenerationStrategy";
Method Core_eForm_OptionsWithMicrotingFormCreateInDB_ReturnseFormId
has 472 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_eForm_OptionsWithMicrotingFormCreateInDB_ReturnseFormId()
{
// Arrange
string xmlstring = @"
Method CaseReadAll
has a Cognitive Complexity of 131 (exceeds 20 allowed). Consider refactoring. 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";
- 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 CoreTestCase.cs
has 945 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;