Open malcolmr opened 2 years ago
For "2. Consider a non-standard version to always have the feature" — That's just to say we have no idea, so we'll err on the side of trying to use the new feature?
Right, if we can't tell, then assume that the feature is present.
At https://github.com/google/vim-codefmt/blob/293c208/autoload/codefmt/clangformat.vim#L32-34, we have this code:
which is trying to find a version number (possibly "1.2.3" or "1.2" or just "1") in the output of
clang-format --version
:However, for trunk builds, the output looks something like:
(where "mainline" can be any string the configurer chooses).
However:
matchstr(l:version_output, '\v\d+(.\d+)+')
has.
matching any character. That probably was intended to be a literal (\.
) instead, otherwise the pattern could just have been\v\d.+
.We probably should do something like:
\.
instead to match a literal.