Code violations are a touchy subject. Sometimes the violations exist just because the codes have changed over the last 150 years. If the code that is violated is not a health or safety concern it does not have to be corrected unless you do a major renovation, and that would be determined by the building department. If the code is a health or safety concern it is in everyones interest to fix it and often the city will require that if discovered. The source of too many code violations however are not outdated installations that were once code but rather new work that was performed incorrectly and usually with out permits. We often come across code violations in our daily service and we will always at least notify an owner of the violation and it possible ramifications if not corrected.