How to exclude legacy code from checks?

by