Showing 886 of 3,221 total issues
Method TemplateUploadData
has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring. Open
public async Task<MainElement> TemplateUploadData(MainElement mainElement)
{
if (mainElement == null)
throw new ArgumentNullException(nameof(mainElement), "mainElement not allowed to be null");
- 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_SimpleFieldGroupsFormFromXML_ReturnseMainElement
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Core_eForm_SimpleFieldGroupsFormFromXML_ReturnseMainElement()
{
// Arrange
string xmlstring = @"
Method Up
has 110 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 QuestionTranslation_Update_DoesUpdate_W_MicrotingUID_RemovesUid
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task QuestionTranslation_Update_DoesUpdate_W_MicrotingUID_RemovesUid()
{
Random rnd = new Random();
Method SQL_Check_FieldValueReadWithUploadedData_ReturnsAnswer
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Check_FieldValueReadWithUploadedData_ReturnsAnswer()
{
// Arrance
Method SQL_Site_SiteReadSimple_ReadsSite
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Site_SiteReadSimple_ReadsSite()
{
// Arrance
Method QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID_AddsUID
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID_AddsUID()
{
Random rnd = new Random();
Method QuestionTranslation_Update_DoesUpdate_W_MicrotingUID
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task QuestionTranslation_Update_DoesUpdate_W_MicrotingUID()
{
Random rnd = new Random();
Method SQL_PostCase_CaseFindCustomMatchs
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_PostCase_CaseFindCustomMatchs()
{
// Arrance
Method SQL_Site_SiteDelete_DeletesSite
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Site_SiteDelete_DeletesSite()
{
// Arrance
Method SQL_Site_SiteUpdate_UpdatesSite
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Site_SiteUpdate_UpdatesSite()
{
// Arrance
Method Answer_Delete_DoesSetWorkflowStateToRemoved
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task Answer_Delete_DoesSetWorkflowStateToRemoved()
{
//Arrange
Method GetExtraFieldValues
has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring. 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();
- 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 QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task QuestionTranslation_Update_DoesUpdate_WO_MicrotingUID()
{
Random rnd = new Random();
File Response.cs
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
Method SQL_answerValues_Delete_DoesDelete
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_answerValues_Delete_DoesDelete()
{
// Arrange
Random rnd = new Random();
Method GetAnswersForQuestionSet
has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring. Open
public async Task GetAnswersForQuestionSet(int? apiQuestionSetId)
{
if (apiQuestionSetId == null)
return;
- 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 SQL_Check_CheckListValueStatusUpdate_UpdatesCheckListValues
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Check_CheckListValueStatusUpdate_UpdatesCheckListValues()
{
// Arrance
#region Arrance
Method SQL_Site_SiteRead_ReadsSite
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_Site_SiteRead_ReadsSite()
{
// Arrance
Method SQL_answerValues_Create_DoesCreate
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
[Test]
public async Task SQL_answerValues_Create_DoesCreate()
{
// Arrange
Random rnd = new Random();