Make sure bad patterns don't come back after refactoring
- by Let_Me_Be
I'm refactoring an old C code. The code has absolutely no layered architecture (everything is being accessed by everything) and I'm trying to change that.
I would like to cut direct access to structure members (at least write for now) and only allow access through access functions. Is there some tool (or perhaps directly the compiler) that could check this rule for me?
I need this since I'm maintaining a fork and the upstream isn't very concerned with code quality.