Format style "Visual Studio" definition #12219
-
I was using the Visual Studio formatting style in VSCode with the cpptools extension. Now most of my code is formatted in this style. Now I want to run format checks with clang-format for CI/CD but the clang-format executeable does not know the "Visual Studio" style. I tried with the "Microsoft" style but it seems to be a little bit different. I found this repo online, but it does not exactly have the same style (finds format errors in files formatted with Visual Studio style): |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
"Visual Studio" is not an official style that you can supply for the "BasedOnStyle" property in a .clang-format. The description of how we emulate the "Visual Studio" style is in the setting description that you screengrabbed.
Official documentation here: https://clang.llvm.org/docs/ClangFormatStyleOptions.html |
Beta Was this translation helpful? Give feedback.
-
Yes thanks that worked! I am using a .clang-format file now, I had to remove the commas, otherwise it does not work. |
Beta Was this translation helpful? Give feedback.
"Visual Studio" is not an official style that you can supply for the "BasedOnStyle" property in a .clang-format. The description of how we emulate the "Visual Studio" style is in the setting description that you screengrabbed.
Official documentation here: https://clang.llvm.org/docs/ClangFormatStyleOptions.html