Skip to content

Use ale#Escape in c_clangformat_style_option#4949

Merged
w0rp merged 2 commits intodense-analysis:masterfrom
mvelikikh:fix/c_clangformat_style_option
Apr 16, 2025
Merged

Use ale#Escape in c_clangformat_style_option#4949
w0rp merged 2 commits intodense-analysis:masterfrom
mvelikikh:fix/c_clangformat_style_option

Conversation

@mvelikikh
Copy link
Contributor

@mvelikikh mvelikikh commented Apr 12, 2025

Closes #4525

The pull request fixes the issue #4525.
I have tested it on Vim 9.1 running on Windows 10 and Ubuntu 24.04.
The original issue happens only on Windows.

Steps to reproduce on Windows 10 with Vim 9.1

  1. Set ale_c_clangformat_style_option:
    g:ale_c_clangformat_style_option = '{IndentWidth: 2, TabWidth: 4}'
    
  2. try to save a sample C file:
    int main() {
         return 0;}
  3. notice the file stays intact and there is an error in :ALEInfo
     (finished - exit code 1) 'cmd /s/c ""D:\Program Files\clang-llvm\clang+llvm-19.1.0-x86_64-pc-windows-msvc\bin\clang-format.exe" --assume-filename=test.c  -style=''{IndentWidth: 2, TabWidth: 4}'' < C:\Users\user\AppData\Local\Temp\V2M4D11.tmp\test.c"'
    

@w0rp w0rp enabled auto-merge (squash) April 16, 2025 02:27
@w0rp
Copy link
Member

w0rp commented Apr 16, 2025

Cheers! 🍻

@w0rp w0rp merged commit baaca9a into dense-analysis:master Apr 16, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parameter g:ale_c_clangformat_options doesn't work on Windows

2 participants