Skip to content

Commit

Permalink
Add a hint to use VisitorState#getSourceForNode in TreeToString.
Browse files Browse the repository at this point in the history
This is already used in a SuggestedFix if possible, but mentioning it in the description seems potentially useful.

Fixes external #1308

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=258724013
  • Loading branch information
graememorgan authored and nick-someone committed Jul 24, 2019
1 parent b30aba8 commit 398d837
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
@BugPattern(
name = "TreeToString",
summary =
"Tree#toString shouldn't be used for Trees deriving from the code being "
+ "compiled, as it discards whitespace and comments.",
"Tree#toString shouldn't be used for Trees deriving from the code being compiled, as it"
+ " discards whitespace and comments. If this code is within an ErrorProne check,"
+ " consider VisitorState#getSourceForNode.",
severity = WARNING,
providesFix = NO_FIX)
public class TreeToString extends AbstractToString {
Expand Down

0 comments on commit 398d837

Please sign in to comment.