In the past we introduced this "accessors" metric for the following bad reasons :
- To not impact too much the average complexity metrics per function/class and file by excluding accessors from complexity computation
- To not make LCOM4 metric too much useless by excluding accessors from LCOM4 computation. We've dropped support of LCOM4 so we can forget this last point.
- To not consider "accessors" as being part of the API
Why was it a bad decision to introduce this "accessors" metrics ?
- Because from a theoretical point of view an "accessor" is definitely a "method/function" and must increment the complexity
- Because nothing prevent a user from injecting a lot of logic in accessors. What should be done in that case ? Is it still an accessor? should we take into account this complexity ?
- Because from a practical point of view, defining what is or not an accessor is a no-end task (
- Because we have the same troubles for all language plugins