follow the letter of the law
To follow rules or laws exactly as they are written, as opposed to ignoring parts of them or exercising a more liberal interpretation of them. I know he's the mayor's cousin, but we need to follow the letter of the law so as to not get accused of giving him preferential treatment. It's frustrating that we pay more in taxes because we follow the letter of the law, while major companies that flout the regulations get away with paying next to nothing! The legislation is becoming increasingly complex, so you must follow the letter of the law to avoid a fine.
Farlex Dictionary of Idioms. © 2024 Farlex, Inc, all rights reserved.