File: ArgumentSelectionDefectChecker.md

package info (click to toggle)
error-prone-java 2.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 23,204 kB
  • sloc: java: 222,992; xml: 1,319; sh: 25; makefile: 7
file content (8 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
If permuting the arguments of a method call means that the argument names are a
better match for the parameter names than the original ordering then this might
indicate that they have been accidentally swapped. There are also legitimate
reasons for the names not to match such as when rotating an image (swap width
and height). In this case we suggest annotating the names with a comment to make
the deliberate swap clear to future readers of the code. Argument names
annotated with a comment containing the parameter name will not generate a
warning.