I was wondering whether there's a way to prevent usage of some functions or macros in a project. For instance we currently have a shell script that more or less grep for todo!, unimplemented!, and a couple more things during the pre-commit hook, but it's a bit shaky. Is there a better way to do this in Rust?
So you can add deny(clippy::todo) (and similar for clippy::unimplemented) to your source. Maybe even forbid if you want to rule out the lint level being overwritten. If it’s for the pre-commit only, and you don’t want it in clippy in general, you can also use command flags, e.g. cargo clippy -- -F clippy::todo -F clippy::unimplemented. If you don’t want to use clippy beyond these lints, it’s also possible to add -A clippy::all to disable all other lints.