Skip to content

Commit

Permalink
Update summary of ArgumentSelectionDefectChecker to make it clearer t…
Browse files Browse the repository at this point in the history
…hat adding

comments to names is a viable fix

RELNOTES: Update summary of ArgumentSelectionDefectChecker

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156339195
  • Loading branch information
andrewrice authored and ronshapiro committed May 24, 2017
1 parent 1d9da4c commit 80b2222
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
*/
@BugPattern(
name = "ArgumentSelectionDefectChecker",
summary = "Arguments to this method call may be in the wrong order",
summary = "Arguments are in the wrong order or could be commented for clarity.",
explanation =
"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 would recommend annotating the names with a comment to make the deliberate "
+ "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.",
category = JDK,
Expand Down

0 comments on commit 80b2222

Please sign in to comment.