(clang-format exit status 1) with ale_c_clangformat_style_option = 'Microsoft' (or others) #4003
Unanswered
ubaldot
asked this question in
Q&A - Ask for help with problems
Replies: 1 comment
-
I think I found why it does not work.
from Powershell, I got the error:
whereas by running
I get my code correctly formatted. May that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running on a
Windows 10
machine with the followingVim
installed:I have also installed all the LLVM and added to the Windows PATH and the Powershell can recognize all the commands like clangd, clangtidy, clang-format, and so on.
I selected
clang-format
as fixer, and it works as is. In-fact, inspection ofALEInfo
shows(finished - exit code 0) 'cmd /s/c "clang-format --assume-filename=C:\Users\yt75534\c_tutorial\Unions\Unions.c < C:\Users\yt75534\AppData\Local\Temp\V48D2FD.tmp\Unions.c"'
Perfect!
But I don't like this formatting, so I decided to go for the
Microsoft
style.After having read
:help ale-c-clangformat
I added the following line to my_vimrc
let g:ale_c_clangformat_style_option = 'Microsoft'
When I run
ALEFix
nothing happens. Inspection ofALEInfo
shows this line:(finished - exit code 1) 'cmd /s/c "clang-format --assume-filename=C:\Users\yt75534\c_tutorial\Unions\Unions.c -style=''Microsoft'' < C:\Users\yt75534\AppData\Local\Temp\V9997E2.tmp\Unions.c"'
that suggests that something went wrong with the command, and in-fact my code is not formatted.
Nevertheless, if I run the following command
clang-format --assume-filename=C:\Users\yt75534\c_tutorial\Unions\Unions.c -style=''Microsoft'' C:\Users\yt75534\c_tutorial\Unions\Unions.c
through the Powershell, I got my code well formatted according to the Microsoft style.
So, essentially, everything works fine as long as I remove the line
let g:ale_c_clangformat_style_option = 'Microsoft'
In-fact, things get even worst if I add a list in it.
For example, by setting
and running
ALEFix
, then Vim return the following error:How shall I set
ale_c_clangformat_style_option
?For completeness, my
ALEInfo
is the followingBeta Was this translation helpful? Give feedback.
All reactions