Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: duplicated autofix output for inverted fix ranges (fixes #8116) #8117
What is the purpose of this pull request? (put an "X" next to item)
[x] Bug fix (#8116)
What changes did you make? (Give an overview)
The padded-blocks rule sometimes produces a fix range where the start index of the range is larger than the end index. Due to the changes in fcc38db, when source-code-fixer encountered such a range, it would output the text between the end index and the start index twice. This commit ensures that source-code-fixer behaves the same way as it previously did when it encounters an inverted fix range (it should act as if the start and end indices were equal). In the future, we should also update padded-blocks to avoid producing inverted fix ranges.
Is there anything you'd like reviewers to focus on?
Nothing in particular
referenced this pull request
Feb 22, 2017
agreed to go with this for the patch release