Linters can check for this sort of thing, for example Error Prone[0] has a lint[1] for this.
Totally agree this is better to be in the language proper so we don't need this extra tooling.
[0]: https://errorprone.info
[1]: https://errorprone.info/bugpattern/ParameterName