CleanCode icon indicating copy to clipboard operation
CleanCode copied to clipboard

Adding suggestions for some of the warning

Open itsho opened this issue 6 years ago • 0 comments

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.

itsho avatar Jul 02 '18 08:07 itsho