Fixed
Status Update
Comments
na...@google.com <na...@google.com> #2
Hello, is there any update on this bug? It is blocking
gh...@google.com <gh...@google.com> #3
I happened to be looking at ReplaceStringQuickFix
recently, and I noticed a way to fix this. Fix is pending at
gh...@google.com <gh...@google.com> #4
Will be fixed in Giraffe Canary 9 by
Description
The comment on the
reformat
method ofLintFix.ReplaceStringBuilder
says it determines "whether the replaced range should be reformatted". However, settingreformat
totrue
causes the entire file to be reformatted when a fix is applied, not just the replaced range. Is it possible to limit the scope of the reformatting to just the replaced range?For context, we have an AndroidX lint check,
ClassVerificationFailureDetector
, that inserts an inner class. It would be nice to have the inserted code reformatted, as it generally has indentation issues that need to be manually fixed. However, reformatting the entire file can cause many changes, which can make it difficult for the person applying the fix and code reviewer to check all the diffs, and sometimes they aren't wanted for a particular file.