Make sure bad patterns don't come back after refactoring

Posted by Let_Me_Be on Stack Overflow See other posts from Stack Overflow or by Let_Me_Be
Published on 2011-07-01T07:26:05Z Indexed on 2011/07/01 8:22 UTC
Read the original article Hit count: 173

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about c

    Related posts about static-analysis