Skip to content

Adding suggestions for some of the warning #37

@itsho

Description

@itsho

First - thank you for your great project.

Easy to understand warnings

Most warnings are pretty understandable, and it's easy to understand how to "fix" the warning.
for example:

  • Too many dependencies,
  • Excessive indentation
  • Method too long
  • Etc.

Not so easy to understand

But some of the warnings are not that clear.
For example:

Condition complexity

object[] props = null; if (props.Length > 3 && (string) props[1] != "test")
I'd expect that part of the warning will be "extract logic into separate method" or any other suggestion you may think of.

Method flag parameters

private int Foooooooooo(bool flag) { if (flag) return 0; return 1; }
it will raise the warning
This argument is used as a flag in the method. This might be violating the Single Responsibility Principle.

if the warning is inconclusive - I would ignore it indefinitely, and we won't gain a thing from it.
If possible, please provide a suggestion how to "fix" this warning.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions