customized rules for inherited classes and module definitions