Re: [go-nuts] Re: Good Cyclomatic Complexity Number for Go

2018-04-15 Thread diego . zoracky
> > Refactoring these to fit any cyclomatic limit also makes code worse and > not worth it. But increasing global limit because of these exceptional > cases doesn't makes any sense - instead, just add pragma to such func: > func validateSomething() { // nolint:gocyclo I feel the same as

Re: [go-nuts] Re: Good Cyclomatic Complexity Number for Go

2018-04-11 Thread diego . zoracky
Cyclomatic complexity can be helpful in keeping us away from writing complex code that can be more error prone, more complex to be tested and harder to reason about. I would give a special attention for the latter one as it implies in low readability and high maintenance costs. For example, an