Skip to content

Commit

Permalink
Fix #2243: VarUsage failures reference a real tree (#2244)
Browse files Browse the repository at this point in the history
VarUsage failures reference a real tree
  • Loading branch information
carterkozak authored May 2, 2022
1 parent 8be3bc8 commit 444a6e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Description matchVariable(VariableTree tree, VisitorState state) {
&& token.hasName()
&& token.name().contentEquals("var")) {
SuggestedFix.Builder fix = SuggestedFix.builder();
return buildDescription(typeTree)
return buildDescription(tree)
.addFix(fix.replace(
token.pos(),
token.endPos(),
Expand Down
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-2244.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: fix
fix:
description: VarUsage failures reference a real tree
links:
- https://github.com/palantir/gradle-baseline/pull/2244

0 comments on commit 444a6e1

Please sign in to comment.