Showing 886 of 3,221 total issues
Method Core_eFormSimpleCheckBoxFormFromXML_ReturnseMainElement
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_eFormSimpleCheckBoxFormFromXML_ReturnseMainElement()
{
string xmlstring = @"
<?xml version='1.0' encoding='UTF-8'?>
Method EntityItems_Delete_DoesSetWorkflowStateToRemoved
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task EntityItems_Delete_DoesSetWorkflowStateToRemoved()
{
//Arrange
File CheckListSitesUTest.cs
has 271 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 options_Create_DoesCreate
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task options_Create_DoesCreate()
{
// Arrange
#region QuestionSet
Method CreateMultiPictureXMLResult
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<string> CreateMultiPictureXMLResult(bool create)
{
if (create)
{
await testHelpers.GenerateDefaultLanguages();
Method CaseToJasperXml
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<string> CaseToJasperXml(CaseDto cDto, ReplyElement reply, int caseId, string timeStamp,
string customPathForUploadedData, string customXMLContent, Language language)
{
string methodName = "Core.CaseToJasperXml";
try
Method QuestionTranslation_Create_DoesCreate_W_MicrotingUID
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task QuestionTranslation_Create_DoesCreate_W_MicrotingUID()
{
Random rnd = new Random();
Method Core_eForm_SimplePictureFormFromXML_ReturnseMainElement
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_eForm_SimplePictureFormFromXML_ReturnseMainElement()
{
// Arrange
string xmlstring = @"
Method Core_eFormSimpleSaveButtonFormFromXML_ReturnseMainElement
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_eFormSimpleSaveButtonFormFromXML_ReturnseMainElement()
{
string xmlstring = @"
<?xml version='1.0' encoding='UTF-8'?>
Method LanguageQuestionSet_Update_DoesUpdate_WO_MicrotingUid
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task LanguageQuestionSet_Update_DoesUpdate_WO_MicrotingUid()
{
//Assert
Random rnd = new Random();
Method Options_Create_DoesCreate
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Options_Create_DoesCreate()
{
Random rnd = new Random();
Method QuestionTranslation_Create_DoesCreate_WO_MicrotingUID
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task QuestionTranslation_Create_DoesCreate_WO_MicrotingUID()
{
Random rnd = new Random();
Method TemplateItemRead
has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring. Open
Open
public async Task<Template_Dto> TemplateItemRead(int templateId, Language language)
{
string methodName = "SqlController.TemplateItemRead";
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_Site_SiteDelete_ReturnsTrue
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test] //Using Communicatorn needs httpMock
public async Task Core_Site_SiteDelete_ReturnsTrue()
{
// Arrange
string siteName = Guid.NewGuid().ToString();
Method Up
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_LanguageQuestionSetVersions_LanguageQuestionSets_LanguageQues",
table: "LanguageQuestionSetVersions");
Method DbFieldToField
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<Models.Field> DbFieldToField(MicrotingDbContext db, Field dbField, Language language)
{
//await using var db = GetContext();
Models.Field field = new Models.Field
{
Method SiteSurveyConfiguration_Delete_DoesDelete
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SiteSurveyConfiguration_Delete_DoesDelete()
{
//Arrange
Method LanguageQuestionSet_Update_DoesUpdate_WO_MicrotingUid_AddsUid
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task LanguageQuestionSet_Update_DoesUpdate_WO_MicrotingUid_AddsUid()
{
//Assert
Random rnd = new Random();
Method Core_eFormSimpleInfoboxFormFromXML_ReturnseMainElement
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_eFormSimpleInfoboxFormFromXML_ReturnseMainElement()
{
string xmlstring = @"
<?xml version='1.0' encoding='UTF-8'?>
Method GetChecksAndFields
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void GetChecksAndFields(ref string clsLst, ref string fldLst, List<Element> elementLst,
string customPathForUploadedData)
{
var db = DbContextHelper.GetDbContext();
string jasperFieldXml = "";