Most or all of these problems, and several more, are solved by using pre-commit. The author vaguely alludes to having had troubles with tools like this, but that has not been my experience.
The problem with somebody bypassing the hooks (intentionally or unintentionally) is solved by running the hooks as part of your CI; if you don’t allow merges that fail these checks, then people can’t skip them. If you also squash merges as a rule, then every commit on your target branch will pass the checks
EDIT: I’ll add that, IMO, hooks should never modify files. They should simply check that your code meets whatever requirements you want your code-base to meet









But the Spanish word “negro” is the source of the English word “negro”, so the two words being the same is not a coincidence in that case. The difference is, that the Spanish meaning did not change, while the word became a slur in English.
A better example would probably be https://www.digmandarin.com/confusing-chinese-n-word.html