Showing 16 of 162 total issues
Method PerformMigration002
has a Cognitive Complexity of 40 (exceeds 20 allowed). Consider refactoring. Open
Open
private static void PerformMigration002()
{
static void MoveDirectory(string source, string target)
{
var sourcePath = source.TrimEnd('\\', ' ');
- 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 PerformMigration001
has a Cognitive Complexity of 40 (exceeds 20 allowed). Consider refactoring. Open
Open
private static void PerformMigration001()
{
static void MoveDirectory(string source, string target)
{
var sourcePath = source.TrimEnd('\\', ' ');
- 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 CreateMultiTranslatable
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static MultiSelectionInquiryData? CreateMultiTranslatable(string titleText, string descriptionText, List<InquiryElement> inquiryElements, bool isExitShown, int minSelectableOptionCount, int maxSelectableOptionCount, string affirmativeText, string negativeText, Action<List<InquiryElement>> affirmativeAction, Action<List<InquiryElement>> negativeAction) =>
Method CreateMulti
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static MultiSelectionInquiryData? CreateMulti(string titleText, string descriptionText, List<InquiryElement> inquiryElements, bool isExitShown, int minSelectableOptionCount, int maxSelectableOptionCount, string affirmativeText, string negativeText, Action<List<InquiryElement>> affirmativeAction, Action<List<InquiryElement>> negativeAction)
Method CreateTextTranslatable
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static TextInquiryData? CreateTextTranslatable(string titleText, string text, bool isAffirmativeOptionShown, bool isNegativeOptionShown, string affirmativeText, string negativeText, Action<string> affirmativeAction, Action negativeAction) =>
Method Create
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static InquiryData? Create(string titleText, string text, bool isAffirmativeOptionShown, bool isNegativeOptionShown, string affirmativeText, string negativeText, Action affirmativeAction, Action negativeAction)
Method CreateText
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static TextInquiryData? CreateText(string titleText, string text, bool isAffirmativeOptionShown, bool isNegativeOptionShown, string affirmativeText, string negativeText, Action<string> affirmativeAction, Action negativeAction)
Method CreateTranslatable
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static InquiryData? CreateTranslatable(string titleText, string text, bool isAffirmativeOptionShown, bool isNegativeOptionShown, string affirmativeText, string negativeText, Action affirmativeAction, Action negativeAction) =>
Method AddInteger
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ISettingsPropertyGroupBuilder AddInteger(string id, string name, int minValue, int maxValue, IRef @ref, Action<ISettingsPropertyIntegerBuilder>? builder);
Method AddFloatingInteger
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public ISettingsPropertyGroupBuilder AddFloatingInteger(string id, string name, float minValue, float maxValue, IRef @ref, Action<ISettingsPropertyFloatingIntegerBuilder>? builder)
Method AddInteger
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public ISettingsPropertyGroupBuilder AddInteger(string id, string name, int minValue, int maxValue, IRef @ref, Action<ISettingsPropertyIntegerBuilder>? builder)
Method AddFloatingInteger
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ISettingsPropertyGroupBuilder AddFloatingInteger(string id, string name, float minValue, float maxValue, IRef @ref, Action<ISettingsPropertyFloatingIntegerBuilder>? builder);
Method AddDropdown
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public ISettingsPropertyGroupBuilder AddDropdown(string id, string name, int selectedIndex, IRef @ref, Action<ISettingsPropertyDropdownBuilder>? builder)
Method AddButton
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public ISettingsPropertyGroupBuilder AddButton(string id, string name, IRef @ref, string content, Action<ISettingsPropertyButtonBuilder>? builder)
Method AddDropdown
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ISettingsPropertyGroupBuilder AddDropdown(string id, string name, int selectedIndex, IRef @ref, Action<ISettingsPropertyDropdownBuilder>? builder);
Method AddButton
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ISettingsPropertyGroupBuilder AddButton(string id, string name, IRef @ref, string content, Action<ISettingsPropertyButtonBuilder>? builder);