clang-format-vsix: versioning patch and show stderrors patch

Antonio Maiorano via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 2 21:52:45 PST 2016


Hello,

I have two patches for clang-format-vsix to offer up for review:

0001-clang-format-vsix-versioning.patch
clang-format-vsix: add a date stamp to the VSIX version number to ensure
upgradability

Presently, the version number of the VSIX matches the LLVM version number.
However, as this number doesn't change often, it means that as we release
new versions of this VSIX, it will have the same version number, which
means users must first uninstall the old version before installing the new
one. With this change, we generate a 4th part to the version number that is
a date stamp (year, month, day); for example: 4.0.0.161203.


0001-clang-format-vsix-show-stderrs.patch
clang-format-vsix: fail when clang-format outputs to stderr

When clang-format outputs to stderr but returns 0, the extension will
format the code anyway. This happens, for instance, when there's a syntax
error or unknown value in a .clang-format file; the result is that the
extension silently formats using the fallback style without informing the
user of the problem. This change treats stderr output as an error, making
sure it gets displayed to the user, and not formatting the code. (I've also
attached a screenshot of the message box I now get when my .clang-format
has an invalid field named SomeInvalidField).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161203/76145fa7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-clang-format-vsix-versioning.patch
Type: application/octet-stream
Size: 1648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161203/76145fa7/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-clang-format-vsix-show-stderrs.patch
Type: application/octet-stream
Size: 2209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161203/76145fa7/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pasted1
Type: image/png
Size: 38738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161203/76145fa7/attachment-0001.png>


More information about the cfe-commits mailing list