Error in ubuntu
wenxingxing opened this issue · 2 comments
wenxingxing commented
It works on mac, but doesn't work on ubuntu... vim's version is 7.4
here is the output of :12verbose ClangFormat
calling function clang_format#replace
calling function clang_format#replace[2]..<SNR>15_verify_command
calling function clang_format#replace[2]..<SNR>15_verify_command[1]..clang_format#is_invalid
function clang_format#replace[2]..<SNR>15_verify_command[1]..clang_format#is_invalid returning #0
continuing in function clang_format#replace[2]..<SNR>15_verify_command
function clang_format#replace[2]..<SNR>15_verify_command returning #0
continuing in function clang_format#replace
calling function clang_format#replace[13]..clang_format#format
calling function clang_format#replace[13]..clang_format#format[2]..<SNR>15_detect_style_file
function clang_format#replace[13]..clang_format#format[2]..<SNR>15_detect_style_file returning #1
continuing in function clang_format#replace[13]..clang_format#format
calling function clang_format#replace[13]..clang_format#format[13]..<SNR>15_shellescape
function clang_format#replace[13]..clang_format#format[13]..<SNR>15_shellescape returning '''10567.cpp'''
continuing in function clang_format#replace[13]..clang_format#format
calling function clang_format#replace[13]..clang_format#format[16]..<SNR>15_shellescape
function clang_format#replace[13]..clang_format#format[16]..<SNR>15_shellescape returning '''/usr/bin/clang-format'''
continuing in function clang_format#replace[13]..clang_format#format
calling function clang_format#replace[13]..clang_format#format[18]..<SNR>15_system
calling function clang_format#replace[13]..clang_format#format[18]..<SNR>15_system[8]..<SNR>15_has_vimproc
function clang_format#replace[13]..clang_format#format[18]..<SNR>15_system[8]..<SNR>15_has_vimproc returning #0
continuing in function clang_format#replace[13]..clang_format#format[18]..<SNR>15_system
Calling shell to execute: "('/usr/bin/clang-format' -lines=1:83 -style=file -assume-filename='10567.cpp' --) < /tmp/vH87AQr/9 >/tmp/v
H87AQr/10 2>&1"
function clang_format#replace[13]..clang_format#format[18]..<SNR>15_system returning 'YAML:47:27: error: unknown key ''Spl...("Not matc
hed");^@ }^@^@ return 0;^@}'
continuing in function clang_format#replace[13]..clang_format#format
function clang_format#replace[13]..clang_format#format returning 'YAML:47:27: error: unknown key ''Spl...("Not matched");^@ }^@^@ ret
urn 0;^@}'
continuing in function clang_format#replace
calling function clang_format#replace[14]..<SNR>15_success
calling function clang_format#replace[14]..<SNR>15_success[1]..<SNR>15_has_vimproc
function clang_format#replace[14]..<SNR>15_success[1]..<SNR>15_has_vimproc returning #0
continuing in function clang_format#replace[14]..<SNR>15_success
function clang_format#replace[14]..<SNR>15_success returning #0
continuing in function clang_format#replace
calling function clang_format#replace[18]..<SNR>15_error_message
function clang_format#replace[18]..<SNR>15_error_message aborted
continuing in function clang_format#replace
calling function clang_format#replace[31]..<SNR>15_restore_screen_pos
function clang_format#replace[31]..<SNR>15_restore_screen_pos returning #0
continuing in function clang_format#replace
Error detected while processing function clang_format#replace[18]..<SNR>15_error_message:
line 1:
clang-format has failed to format.
function clang_format#replace aborted
rhysd commented
Could you try following command?
$ cat 10567.cpp | '/usr/bin/clang-format' -lines=1:83 -style=file -assume-filename='10567.cpp' --
And please let me know the version of the clang-format and, if possible, please show the code that can reproduce this problem.
wenxingxing commented
Thanks, it turns out that clang-format-3.8 which I'm using on ubuntu can't read the config I generated on mac using clang-format-5.0.