Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autoload/ale/fixers/clangformat.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function! ale#fixers#clangformat#Fix(buffer) abort
let l:use_local_file = ale#Var(a:buffer, 'c_clangformat_use_local_file')

if l:style_option isnot# ''
let l:style_option = '-style=' . "'" . l:style_option . "'"
let l:style_option = '-style=' . ale#Escape(l:style_option)
endif

if l:use_local_file
Expand Down
3 changes: 2 additions & 1 deletion test/fixers/test_clangformat_fixer_callback.vader
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ Execute(The clangformat callback should include style options as well):
\ {
\ 'command': ale#Escape(g:ale_c_clangformat_executable)
\ . ' --assume-filename=' . ale#Escape(bufname(bufnr('')))
\ . ' --some-option' . " -style='{BasedOnStyle: Microsoft, ColumnLimit:80,}'",
\ . ' --some-option'
\ . ' -style=' . ale#Escape(g:ale_c_clangformat_style_option)
\ },
\ ale#fixers#clangformat#Fix(bufnr(''))

Expand Down