google / google/vim-codefmt

codefmt shouldn't call FormatRanges with empty a:ranges

Open
#50 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
1.1k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

As noted in #48, we seem to have some cases where a formatter's `FormatRanges()` will be invoked with an empty `a:ranges`. Either that, or we're unnecessarily checking for emptiness in the clang-format formatter.

Unless I'm missing something, this doesn't seem like it's useful; the interface with formatters should say that this is impossible, and we should remove the checks we have.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.