frc-frecon / frecon

An API for building scouting apps for FRC competitions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Many Methods' Cyclomatic Complexity and Length are too high

rye opened this issue · comments

We have 26 different possible linear paths through MatchNumber#initialize and a number of other methods have similarly high complexities. Also, many of these same methods are large, branching statements that seem to have a high amount of behavioral variance. These two characteristics are code smells, and indicate that something is bad about these methods.

It would be advantageous to write up a spec for these ones and to then refactor out things. We could just do a risky protection-less refactor, but that's risky and sad. Spec first.

This will constitute the next release, in addition to the other work that has taken place on master since the most recent.

MatchNumber#initialize is very large and sad. I'm currently working on refactoring it.