Showing 886 of 3,221 total issues
Method SQL_SiteWorker_SiteWorkerRead_ReadsSiteWorker
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_SiteWorker_SiteWorkerRead_ReadsSiteWorker()
{
// Arrance
Method GetExtraFieldValues
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<string> GetExtraFieldValues(int caseId, string customPathForUploadedData, Language language)
{
var token = await GetSdkSetting(Settings.token);
var db = DbContextHelper.GetDbContext();
StringBuilder jasperFieldXml = new StringBuilder();
Method SQL_Worker_WorkerRead_ReadsWorker
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_Worker_WorkerRead_ReadsWorker()
{
// Arrance
#region Arrance
Method SQL_Worker_WorkerNameRead_ReadsName
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_Worker_WorkerNameRead_ReadsName()
{
// Arrance
#region Arrance
Method SQL_SiteWorker_SiteWorkerDelete_DeletesSiteWorker
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_SiteWorker_SiteWorkerDelete_DeletesSiteWorker()
{
// Arrance
Method SQL_SiteWorker_SiteWorkerUpdate_UpdatesSiteWorker
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_SiteWorker_SiteWorkerUpdate_UpdatesSiteWorker()
{
// Arrance
Method SQL_SiteWorker_SiteWorkerCreate_ReturnsID
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_SiteWorker_SiteWorkerCreate_ReturnsID()
{
// Arrance
Method SQL_Worker_WorkerUpdate_UpdatesWorker
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_Worker_WorkerUpdate_UpdatesWorker()
{
// Arrance
#region Arrance
Method SQL_Worker_WorkerDelete_DeletesWorker
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_Worker_WorkerDelete_DeletesWorker()
{
// Arrance
#region Arrance
Method TemplateItemReadAll
has a Cognitive Complexity of 51 (exceeds 20 allowed). Consider refactoring. Open
Open
public async Task<List<Template_Dto>> TemplateItemReadAll(bool includeRemoved, string siteWorkflowState,
string searchKey, bool descendingSort, string sortParameter, List<int> tagIds, TimeZoneInfo timeZoneInfo,
Language language)
{
string methodName = "SqlController.TemplateItemReadAll";
- 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_eForm_SimpleMultiSelectFormFromXML_ReturnseMainElement
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_eForm_SimpleMultiSelectFormFromXML_ReturnseMainElement()
{
// Arrange
string xmlstring = @"
File CheckListValuesUTest.cs
has 390 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_Unit_UnitCreate_CreatesUnit
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_Unit_UnitCreate_CreatesUnit()
{
// Arrance
Method SQL_Check_FieldValueReadAllValues_ReturnsReturnList
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_Check_FieldValueReadAllValues_ReturnsReturnList()
{
// Arrance
Method StartSqlOnly
has a Cognitive Complexity of 49 (exceeds 20 allowed). Consider refactoring. Open
Open
public async Task<bool> StartSqlOnly(string connectionString)
{
// SentrySdk.Init(options =>
// {
// // A Sentry Data Source Name (DSN) is required.
- 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 CheckListValues_Update_DoesUpdate
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task CheckListValues_Update_DoesUpdate()
{
//Arrange
Method Questions_Update_DoesUpdate
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Questions_Update_DoesUpdate()
{
//Arrange
Method SaveAnswer
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task SaveAnswer(JToken subItem, int questionSetId)
{
Log.LogStandard("Core.SaveAnswer", $"called {DateTime.UtcNow}");
var settings = new JsonSerializerSettings { Error = (se, ev) => { ev.ErrorContext.Handled = true; } };
await using (var db = DbContextHelper.GetDbContext())
Method SQL_Template_TemplateUpdateFieldIdsForColumns_UpdatesIds
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_Template_TemplateUpdateFieldIdsForColumns_UpdatesIds()
{
// Arrance
Method CheckListValues_Delete_DoesSetWorkflowStateToRemoved
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task CheckListValues_Delete_DoesSetWorkflowStateToRemoved()
{
//Arrange