Showing 886 of 3,221 total issues
Method question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayTrue
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayTrue()
{
// Arrange
string name = Guid.NewGuid().ToString();
Method question_Create_DoesCreate_QuestionSetFalse_ValidDisplayImageTrue
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task question_Create_DoesCreate_QuestionSetFalse_ValidDisplayImageTrue()
{
// Arrange
string name = Guid.NewGuid().ToString();
Method question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayImageTrue
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task question_Create_DoesCreate_QuestionSetFalse_PrioritisedValidDisplayImageTrue()
{
// Arrange
string name = Guid.NewGuid().ToString();
Method InsertImages
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void InsertImages(WordprocessingDocument wordDoc,
List<KeyValuePair<string, List<string>>> pictures)
{
string currentHeader = "";
List<Paragraph> foundEntriesToClearText = new List<Paragraph>();
Method Close
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<bool> Close()
#pragma warning restore 1998
{
string methodName = "Core.Close";
Log.LogStandard(methodName, "Close called");
Method SiteWorkers_Delete_DoesSetWorkflowStateToRemoved
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SiteWorkers_Delete_DoesSetWorkflowStateToRemoved()
{
// Arrange
Method EntityItemCreate
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<EntityItem> EntityItemCreate(int entitItemGroupId, string name, string description,
string ownUuid, int displayIndex)
{
EntityGroup eg = await _sqlController.EntityGroupRead(entitItemGroupId).ConfigureAwait(false);
EntityItem et = await _sqlController.EntityItemRead(entitItemGroupId, name, description)
File Tools.cs
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
Method SubscriberThread
has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring. Open
Open
private void SubscriberThread()
{
var token = _sqlController.SettingRead(Settings.token).GetAwaiter().GetResult();
if (token != "UNIT_TEST___________________L:32" && token != "abc1234567890abc1234567890abcdef")
{
- 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_Folders_CreateSubFolder_DoesCreateSubFolder
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task Core_Folders_CreateSubFolder_DoesCreateSubFolder()
{
// Arrange
Method SQL_answers_Create_DoesCreate_UTCAdjustedTrue
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task SQL_answers_Create_DoesCreate_UTCAdjustedTrue()
{
// Arrange
Random rnd = new Random();
Method SetAutoIncrementforTables
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void SetAutoIncrementforTables(MigrationBuilder migrationBuilder)
{
List<string> modelNames = new List<string>();
modelNames.Add("case_versions");
modelNames.Add("cases");
Method CaseCreate
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<int> CaseCreate(int checkListId, int siteUId, int? microtingUId, int? microtingCheckId,
string caseUId, string custom, DateTime createdAt, int? folderId)
{
string methodName = "SqlController.CaseCreate";
_log.LogStandard(methodName, "called");
Method FolderUpdate
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task FolderUpdate(int id, List<CommonTranslationsModel> translations, int? parentId)
{
string methodName = "Core.FolderUpdate";
try
{
Method QuestionSets_Update_DoesUpdate
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task QuestionSets_Update_DoesUpdate()
{
//Arrange
Method GetAllQuestionSets
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<bool> GetAllQuestionSets()
{
var parsedData = JObject.Parse(await _communicator.GetAllQuestionSets().ConfigureAwait(false));
if (!parsedData.HasValues)
Method UploadedData_Create_DoesCreate
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task UploadedData_Create_DoesCreate()
{
//Arrange
Random rnd = new Random();
Method Core_Case_CaseCreate_CreatesCase
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]//needs http mock done
public async Task Core_Case_CaseCreate_CreatesCase()
{
// Arrange
#region Template1
Method question_Create_DoesCreate_QuestionSetFalse_BackButtonEnabledImageTrue
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task question_Create_DoesCreate_QuestionSetFalse_BackButtonEnabledImageTrue()
{
// Arrange
string name = Guid.NewGuid().ToString();
Method EntityItems_Create_DoesCreate
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Test]
public async Task EntityItems_Create_DoesCreate()
{
//Arrange