4 ms·
ErrorProne has a nice safeguard against this if you're writing Java code: https://github.com/google/error-prone/blob/master/docs/bugpattern/ParameterName.md htt
by jdm2212 7y ago
ErrorProne has a nice safeguard against this if you're writing Java code: https://github.com/google/error-prone/blob/master/docs/bugpattern/ParameterName.md https://github.com/google/error-prone/blob/master/docs/bugpa...
It detects if your function signature is
> foo(first, second)
and you call it with
> foo(second, first)
that is, it actually checks for variable names that are mismatched, with comments like
> foo(/* first= * / second, /* second= * / first)
as an escape hatch.