Fixed
Status Update
Comments
tn...@google.com <tn...@google.com> #2
Fixed by ag/12352668 and ag/12351963 for an upcoming 4.2 build. Thanks for the report!
No update yet.
Fixed by ag/12352668 and ag/12351963 for an upcoming 4.2 build. Thanks for the report!
Description
I want my lint rule to show the warning in the java/kotlin class file and apply the fix in the
build.gradle
file.I attempted to to this by passing
context.getLocation(statementCookie)
as the argument torange()
in theReplaceStringBuiler
of the LintFix. In an actual app, applying the fix seems to do nothing, while in my test applying the fix replaces the code where the warning is.I also tried passing
Location.create(context.file)
as the location. This replaces the code where the warning is in both tests and an actual app.The
context
andstatementCookie
are coming from thecheckDslPropertyAssignment()
method.