Showing 11 of 141 total issues
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 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 Create
has 13 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, string soundEventPath = "", float expireTime = 0f, Action? timeoutAction = null,
Func<ValueTuple<bool, string>>? isAffirmativeOptionEnabled = null, Func<ValueTuple<bool, string>>? isNegativeOptionEnabled = null)
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 AddButton
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
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
public ISettingsPropertyGroupBuilder AddDropdown(string id, string name, int selectedIndex, IRef @ref, Action<ISettingsPropertyDropdownBuilder>? 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
public ISettingsPropertyGroupBuilder AddButton(string id, string name, IRef @ref, string content, Action<ISettingsPropertyButtonBuilder>? builder)