(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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am running on a
Windows 10machine with the followingViminstalled: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-formatas fixer, and it works as is. In-fact, inspection ofALEInfoshows(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
Microsoftstyle.After having read
:help ale-c-clangformatI added the following line to my_vimrclet g:ale_c_clangformat_style_option = 'Microsoft'When I run
ALEFixnothing happens. Inspection ofALEInfoshows 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.cthrough 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
ALEInfois the followingBeta Was this translation helpful? Give feedback.
All reactions