When code enforcement became an anti-immigrant weapon, one official said enough. Now he’s suing.